When I run the following command:
convert "test.jpg" -resize 532x308 -quality 85 "output.jpg"
As a result I have output.jpg image with size: 531x308: https://gyazo.com/2741f35488d53e02aa6147a0beecf42e
Why it is not pixel perfect, i.e why output image do not have size 532x308? Or I do not understand something?
Thanks
Resize issue with image
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Resize issue with image
See http://www.imagemagick.org/script/comma ... p#geometry
By default, IM resizes to keep the same aspect ratio. If you want exactly 532x308, use a "!" suffix, eg:
Depending on your shell, you may need to escape the "!" or put the resize string in quotes or both.
By default, IM resizes to keep the same aspect ratio. If you want exactly 532x308, use a "!" suffix, eg:
Code: Select all
convert "test.jpg" -resize 532x308! -quality 85 "output.jpg"
snibgo's IM pages: im.snibgo.com
Re: Resize issue with image
It works perfectly. Thanks!