Reputation: 137
Im trying to resize photos with different resolution, so i have to know how to limit minimal properties of image. I want to print my photos 6x8, so i need fixed height(1800), proportional width:
mogrify -resize x1800 *.JPG
But how to prevent resizing if image smaller than x1800? They will enlarge up to 1800 height.
Upvotes: 0
Views: 95
Reputation: 137
Found fx expressions, so i can
magick 1.jpg -resize "x%[fx:(h>1800)?1800:h]" 2.JPG
Upvotes: 0
Reputation: 5299
Checking out the software instructions can usually give you the answer: https://www.imagemagick.org/script/command-line-processing.php#geometry
Try
mogrify -resize x1800> *.JPG
Upvotes: 1