Request: Option to 'Convert only if specified file parameter condition is satisfied'
Posted: Wed Jul 24, 2019 5:21 pm
There are requests from time to time to be able to convert images only if a specified file parameter condition is satisfied, for example only if 'pixel height is greater than 720px' or only if 'filesize is greater than 1000kb'.
A recent thread Pull out image height requested a way to copy a specified image file parameter to a variable, which could then be used in a script. That could have general application, but would require familiarity with a scripting language.
Another possible solution might be to add a new NConvert option to convert an image only if a specified file parameter condition is satisfied; as access to file parameters is already available, that might not be difficult to implement.
Initial support might be for: height | width | filesize set to | greater than | less than .
So maybe something like:
A recent thread Pull out image height requested a way to copy a specified image file parameter to a variable, which could then be used in a script. That could have general application, but would require familiarity with a scripting language.
Another possible solution might be to add a new NConvert option to convert an image only if a specified file parameter condition is satisfied; as access to file parameters is already available, that might not be difficult to implement.
Initial support might be for: height | width | filesize set to | greater than | less than .
So maybe something like:
Code: Select all
-convert height_px greater_than 720