Resize to area, but not if images are smaller
Posted: 2011-06-10T23:49:30-07:00
Hi. I have written this command to resize, correct levels and rename all the files in the pics1 folder to the pics2 folder.
convert pics1\*.jpg -resize 3000000@ -auto-level -quality 95 -set filename:f %f pics2\z_%[filename:f]
The resizing is based on a fixed megapixels data. What I'd like to know is how to prevent images with a lower size in megapixels from being resized. I've read the docs and noticed you can use < for that, but it seems it doesn't work with areas. I could use previous commands like identify -format %w file.jpg and identify -format %h test.jpg to calculate the size in megapixels but that would complicate everything. Any idea?
Thanx.
convert pics1\*.jpg -resize 3000000@ -auto-level -quality 95 -set filename:f %f pics2\z_%[filename:f]
The resizing is based on a fixed megapixels data. What I'd like to know is how to prevent images with a lower size in megapixels from being resized. I've read the docs and noticed you can use < for that, but it seems it doesn't work with areas. I could use previous commands like identify -format %w file.jpg and identify -format %h test.jpg to calculate the size in megapixels but that would complicate everything. Any idea?
Thanx.