Page 1 of 1

Problem with resizing doing the opposite of what is asked.

Posted: 2016-04-29T15:41:22-07:00
by evanfort
Couldn't find this issue in a search, but I have a weird issue.

I just used convert to shrink a few thousand images and it worked on most of them. On a few though, it actually make the images smaller even though they were already smaller than the requested size.

Here is an example, original:
http://media3.picsearch.com/is?_Sj46cn8 ... height=232

After conversion:
https://s3.amazonaws.com/porcloud-stage ... 204880.jpg

Here is the command I used:
convert -quality 90 -resize 800x800\> 204880.jpg tn_204880.jpg

This image should have been left alone and output at the same size. Note, if I run it without the \> it will force the image to 800px wide, but some some reason, using this command it gets smaller instead. Any ideas?
Version: 6.7.7-10 2014-03-06 Q16

Re: Problem with resizing doing the opposite of what is asked.

Posted: 2016-04-29T15:56:21-07:00
by snibgo
It works fine on a more recent version of IM, v6.9.2-5.

(I tried in the correct order: read input, then resize, then write output, as well as the incorrect order in your post.)

Re: Problem with resizing doing the opposite of what is asked.

Posted: 2016-04-29T18:16:55-07:00
by fmw42
What platform? Please always provide your IM version and platform. I presume it is Unix, since you use \>. IM 6.7.7.10 is ancient (about 160 versions old). You should try upgrading, if you can.

You can try also doing it with quotes.

Code: Select all

convert 204880.jpg -resize "800x800>" -quality 90 tn_204880.jpg
Unless you add !, it will resize preserving aspect ratio. So the larger dimension will go to 800 and the smaller dimension will scale smaller than 800 in proportion. But if you add !, it will distort the image to force it to 800x800.