1. Convert .TIF to .JPG
2. Resize such that the dimensions (width & height) are within a threshold.
3. Preserve physical dimensions (width & height in inches).
For example:
If the input file is a TIFF image with 3000x2000 dimension and 300 DPI resolution (i.e. 10 inches x 6.67 inches) and the dimension threshold is 2000 (the longer side shouldn’t be more than this), the output should be a JPEG image with 2000x1333 dimension and 200 DPI resolution (i.e. 10 inches x 6.67 inches - preserved)
My problem:
Code: Select all
Convert input.tif –resize “2000x2000>” output.jpg
Code: Select all
Convert input.tif –resample 200x200 output.jpg
Will you please help me in finding an appropriate command / combination of commands for achieving this? You can also suggest a mechanism for calculating the desired density based on the image dimensions and set threshold and using it in resample in a single command line.
Thank you.