Convert images from Windows Batch script
Posted: 2017-02-06T03:26:51-07:00
Hi
This is my first post here, so hope my questions is ok.
We use Imagemagick for batch processing images before using them on our website.
We currently use the following:
convert input.jpg -resize 1300x1300 -quality 60 -strip -colorspace sRGB output.jpg
Our images come in various formats. Our website is optimized for handling images with proportions 3:2 in both landscape and portrait format, i.e. 1300x867 and 867x1300.
I would like to automate so that all images are automatically resized to have this proportion of 3:2 (it should cut off equally in top/bottom or left/right when cropping). Not sure if Imagemagick can figure out whether it is supposed to be an portrait image (height > width) or landscape image (width > height) and then make the crop to the 3:2 (or 2:3) format accordingly and after that resize to have a max width/height of 1300 px ?
Can anyone help ?
Thank you in advance
/Jacob
This is my first post here, so hope my questions is ok.
We use Imagemagick for batch processing images before using them on our website.
We currently use the following:
convert input.jpg -resize 1300x1300 -quality 60 -strip -colorspace sRGB output.jpg
Our images come in various formats. Our website is optimized for handling images with proportions 3:2 in both landscape and portrait format, i.e. 1300x867 and 867x1300.
I would like to automate so that all images are automatically resized to have this proportion of 3:2 (it should cut off equally in top/bottom or left/right when cropping). Not sure if Imagemagick can figure out whether it is supposed to be an portrait image (height > width) or landscape image (width > height) and then make the crop to the 3:2 (or 2:3) format accordingly and after that resize to have a max width/height of 1300 px ?
Can anyone help ?
Thank you in advance
/Jacob