Page 1 of 1

Resizing image without stretching it, possible?

Posted: 2011-02-21T14:46:36-07:00
by john86b
This wonderful little software saved me about ten thousand hours of work, but now I need something I do not know whether it's possible.
I have these 40x40 png icons, but the elements inside it fit a 32x32 size PERFECTLY, how can I resize all my png icons and centralize the object?

Thanks!

Re: Resizing image without stretching it, possible?

Posted: 2011-02-21T15:08:42-07:00
by john86b
Actually, I was thinking about it, this isn't a matter of resizing, it's more a matter of cropping out the left over space... from 40x40 to 32x32

Re: Resizing image without stretching it, possible?

Posted: 2011-02-21T15:09:45-07:00
by fmw42
can you post a link to an example icon and explain what the issue is. the command -resize will resize proportionally if that is what you mean (that is keeping the aspect ratio).

see
http://www.imagemagick.org/script/comma ... php#resize
http://www.imagemagick.org/script/comma ... p#geometry
http://www.imagemagick.org/Usage/resize/

Re: Resizing image without stretching it, possible?

Posted: 2011-02-21T15:11:15-07:00
by fmw42
john86b wrote:Actually, I was thinking about it, this isn't a matter of resizing, it's more a matter of cropping out the left over space... from 40x40 to 32x32
Is the 32x32 always centered in the 40x40?

convert icon -gravity center -crop 32x32+0+0 +repage smallicon

see
http://www.imagemagick.org/Usage/crop/#crop