Page 1 of 1

Command line -scale and -resize not working

Posted: 2012-05-25T12:11:37-07:00
by Cybert99
I'm passing the following to ImageMagick through Excel (VBA):

Code: Select all

convert.exe filename.jpg -clip 440x236+535+304 -scale 216x116 newname.png
The resulting image is supposed to be 216x116 but instead it's 155x116. What am I doing wrong?

NOTE: I was initially clipping an image size of 440x210 and "-scale" gave me an image size of 216x103. I then tried "-resize" but this gave me an image size of 155x116. So I went back to "-scale" and made sure the aspect ratio of the clipped image was the same as the output image. But now "-scale" is giving me images that are 155x116.

I'm very confused!

Re: Command line -scale and -resize not working

Posted: 2012-05-25T12:25:08-07:00
by Bonzo
I would say you want -crop not -clip as -clip works with a clipping path and you are not suppling one.

Code: Select all

convert.exe filename.jpg -crop 440x236+535+304 -resize 216x116 newname.png

Re: Command line -scale and -resize not working

Posted: 2012-05-25T12:45:35-07:00
by Cybert99
I added a "!" using the "-resize" command and it looks like it's working now...