GP SoftwareTwitter
Opus FAQsManualCommandsObjects

Resize image only if the new size is smaller

Is there any way we can resize images only if the target size is smaller than the original?

For example, with XnView we have an option to choose if we want to only reduce the size (or enlarge):

image

It's very useful as most of the time you only want to reduce the size, but if one of the selected images is already smaller, it will still be resized to a higher resolution (which I don't want).

Not via the normal UI, but if you do it via a button/command, the Image command has NOENLARGE and NOREDUCE arguments to make it only resize in one direction.

e.g.

Image NOENLARGE PRESERVEASPECTRATIO WIDTH=1000 HEIGHT=400 ADDSUFFIX="-reduced" HERE

That would give you a one-click button to take all selected images, resize them to fit within 1000x400, and output the results to the same folder with -reduced added to the new filenames.

Images which already fit within 1000x400 would be skipped entirely.

1 Like

That is PERFECT!
Thank you very much

1 Like