I have a bunch of images in a folder with different dimensions and ratio.
I want to shrink all of them while keeping a minimum height and width, while keeping the same ratio.
convert -resize -minwidth 300 -minheight 200 -keep-ratio src *.jpg
Then all shrinked images would have at least 300 width and 200 height, and they will retain the original ratio.
Is this even possible without some heavy scripting?
Things I've tried:
➜ swazidowners mogrify -resize 300x200^ "*.jpg" zsh: no matches found: 300x200^ ➜ swazidowners mogrify -resize 300x200^ bbq.jpg zsh: no matches found: 300x200^ ➜ swazidowners mogrify -resize 300x200 bbq.jpg # just to show that it works without ^ character ➜ swazidowners
OS: Ubuntu 16.04x64
$ mogrify -version Version: ImageMagick 6.8.9-9 Q16 x86_64 2016-11-29 http://www.imagemagick.org Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC Features: DPC Modules OpenMP Delegates: bzlib cairo djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png rsvg tiff wmf x xml zlib