Page 1 of 1

Re: help resizing a transparent png

Posted: 2009-04-17T18:08:32-07:00
by fmw42
Interesting that I don't see -size in the options page at http://www.imagemagick.org/script/comma ... ptions.php

If you want to add a border, use either -extent or -border. see http://www.imagemagick.org/script/comma ... ptions.php

But your command is needlessly complicated. I would do it this way

convert mypng.png -resize 480x270\> -gravity center -background none -extent 480x270 resized.png

Re: help resizing a transparent png

Posted: 2009-04-22T21:39:42-07:00
by anthony
the -size option specifies the size of an image to generate (xc: gradient: plasma: label: etc) or hint at what the final size will be for JPEG.

That last can cause problems if reading in images later afetr creating a canvas image of some kind. It may be a good idea to turn off the size setting (using +size) if you plan to read in other images later. This has caught me out on occasion.

It would be nice in the JPEG size hint was a separate coder setting (typically a -define option) instead of -size