Resize problem running a bat vs command window

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
troyd1
Posts: 73
Joined: 2007-07-29T17:13:19-07:00

Resize problem running a bat vs command window

Post by troyd1 »

I have 6.6.9-7. q16 dynamic - window xp

If I do: "convert -size 1650x1275 xc:"#ffffcc" -resize 50% test2.png" it work perfectly. I get an image that is 825x638.

It I create a .bat file withthe same command, it ignores the % sign and create an image that is 50x39. I tried adding a \ before the %, but that does not work either. Is this a bug or am I doing something wrong?

as a followup, I also tried putting quotes around the 50% and it did not make a difference.
convert -size 1650x1275 xc:"#ffffcc" -resize "50%" test2.png
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Resize problem running a bat vs command window

Post by Bonzo »

Try escaping the % with another % 50%%
troyd1
Posts: 73
Joined: 2007-07-29T17:13:19-07:00

Re: Resize problem running a bat vs command window

Post by troyd1 »

OK. I figured it out. I will keep the message out here in case someone else has the same problem. percent signs in a bat file need to be escaped with another percent sign. I changed it to 20%% and it works fine.
troyd1
Posts: 73
Joined: 2007-07-29T17:13:19-07:00

Re: Resize problem running a bat vs command window

Post by troyd1 »

sorry bonzo, missed your post. Thanks for the input.
Post Reply