Image resize problem

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
magickman

Image resize problem

Post by magickman »

When I converted this image:Image to 300x200 using imagemagick, convert IMG.jpg -resize 300x200 newIMG.jpg,
I don't get width 300 and height 200. After conversion, height always greater than the width.
Any idea why?
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Image resize problem

Post by Bonzo »

ImageMagick will resize to the largest size defined and resize the other edge to keep the aspect ratio.

If you want to force different sizes etc. you will need to tell it.

http://www.imagemagick.org/script/comma ... php#resize
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Image resize problem

Post by anthony »

Basically it 'fits' the image into the size given, and preserves the aspect ratio.
If you don't want it to preserve the aspect ratio add a '!' flag.
http://imagemagick.org/Usage/resize/
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply