Page 1 of 1

Scale and Resize

Posted: 2010-03-21T05:15:37-07:00
by snibgo
Scale and resize with ! aren't giving me the expected sizes. I expect 200x300, but I get only 200x200.

Code: Select all

>convert xc:red -size 1x1 onepix.png

>convert onepix.png -scale 200x300! twothree.png

>identify twothree.png
twothree.png PNG 200x200 200x200+0+0 16-bit DirectClass 877B 0.000u 0:00.001

>convert onepix.png -resize 200x300! twothreeR.png

>identify twothreeR.png
twothreeR.png PNG 200x200 200x200+0+0 16-bit DirectClass 877B 0.000u 0:00.001
Using double quotes (for Windows), eg -scale "200x300!", doesn't help.

Is this a bug?

Version: ImageMagick 6.6.0-8 2010-03-18 Q16 http://www.imagemagick.org
Features: OpenMP
Windows 7

Re: Scale and Resize (solved)

Posted: 2010-03-21T05:56:17-07:00
by snibgo
Solved: it isn't an IM bug. I have delayed expansion enabled, so Windows is interpreting the "!", and not passing it to IM. I can't figure out how to escape the "!" (can anyone help???). The workaround is to start my script with:

Code: Select all

setlocal DISABLEDELAYEDEXPANSION

Re: Scale and Resize

Posted: 2010-03-21T08:43:22-07:00
by el_supremo
Hi Snibgo,
The escape character for DOS is the caret so try ^!

Pete

Re: Scale and Resize

Posted: 2010-03-21T08:53:21-07:00
by snibgo
Ah, yes, thanks, Pete. Can you debug my brain, please?