Scale and Resize

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Scale and Resize

Post 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
snibgo's IM pages: im.snibgo.com
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Scale and Resize (solved)

Post 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
snibgo's IM pages: im.snibgo.com
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: Scale and Resize

Post by el_supremo »

Hi Snibgo,
The escape character for DOS is the caret so try ^!

Pete
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Scale and Resize

Post by snibgo »

Ah, yes, thanks, Pete. Can you debug my brain, please?
snibgo's IM pages: im.snibgo.com
Post Reply