Resize images with height greater than 720px recursively

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: XnTriq, xnview

Post Reply
mrmrmr1337
Posts: 1
Joined: Wed Jul 24, 2019 6:41 am

Resize images with height greater than 720px recursively

Post by mrmrmr1337 » Wed Jul 24, 2019 6:46 am

Hello,

My goal is to go recursively through all images in a folder and its subfolders, something like this:
/images/
/images/1/
/iamges/2/

In each directory there are images, jpg's and png's, if those images have a height greater than 720px I want to resize the image to 720px height maintaining its aspect ratio, and also clean its meta data.

I want to save each image with the same name and file extension whether it is a png or jpg, and then to replace the current image. But only convert images with a height greater than 720px.

cday
XnThusiast
Posts: 2182
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: Resize images with height greater than 720px recursively

Post by cday » Wed Jul 24, 2019 5:27 pm

As far as I know, there is currently no way convert images selectively according to the value of a specified image parameter. :(

However, the need is requested periodically, please see this new thread:

Request: Option to 'Convert only if specified file parameter condition is satisfied'.

Post Reply