I was following this example http://cubiq.org/create-fixed-size-thumbnails-with-imagemagick, and it's exactly what I want to do with the image, with the exception of having the background leftovers (i.e. the white borders). Is there a way to do this, and possibly crop the white background out? Is there another way to do this? The re-size needs to be proportional, so I don't just want to set a width re-size limit or height limit, but proportionally re-size the image.
ImageMagick: How to resize proportionally with mogrify without a background
imagemagickmogrify
Best Answer
The example you link to uses this command:
First,
mogrify
is a bit dangerous. It manipulates your originals inline, and it overwrites the originals. If something goes wrong you have lost your originals, and are stuck with the wrong-gone results. In your case the-path thumbs
however alleviates this danger, because makes sure the results will be written to sub directory thumbsAnother ImageMagick command,
convert
, can keep your originals and do the same manipulation asmogrify
:If want the same result, but just not the white canvas extensions (originally added to make the result a square 80x80 image), just leave away the
-extent 80x80
parameter (the-background white
andgravity center
are superfluous too):or