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.
The default "canvas:" or "xc:" is a 1x1 pixel square. The bang "!" will cause the command to ignore the 1:1 aspect and force the resize to the 100x30 dimensions.
Thanks, I forgot about the sequence of events (xc:color[WxH] doesn't directly generate a WxH image; instead it makes a 1x1 image then resizes it to WxH). So there's no bug here, just pilot error on my part.
I still get a puzzling result from xc:[W], though; that produces a 1x1 image instead of a WxW one. I think that's probably because the integer "W" is being interpreted as a scene number instead of as a geometry.
glennrp wrote:I still get a puzzling result from xc:[W], though; that produces a 1x1 image instead of a WxW one. I think that's probably because the integer "W" is being interpreted as a scene number instead of as a geometry.
Makes sense. If you put the "x" in there after the width, like "xc:[480x]", it should make the 480 pixel square canvas.
Normally an extra "x" or "!" wouldn't matter, but I came across this problem while playing "Code Golf" at http://codegolf.stackexchange.com/quest ... 9087#99087 where every byte I use counts against me (similar to the actual game of golf where every whack at the ball counts against you).
The bash csh-style history expansion with "!" only happens when you are typing in commands from a terminal window. In a bash script, a "!" is just a "!".