I want to shrink the images only if they are bigger than the size 300X100 dimension, for example:
- If image is 250X200 dimension I want it with 250X100 dimension
- If image is 420X90 I want it with 300X90
- If height or width are greater than 300X100 then only i need to Shrink it
- Otherwise use same height or width
How can I write this type of conditional ImageMagick commands in my Java program? I am writing like this:
convert image.jpg -resize 387x97^> image_resized.jpg.
but this is not working.