When I converted this 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?
Image resize problem
Re: Image resize problem
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
If you want to force different sizes etc. you will need to tell it.
http://www.imagemagick.org/script/comma ... php#resize
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Image resize problem
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/
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/
https://imagemagick.org/Usage/