Can't convert 1x# pixel images

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
cwolves
Posts: 1
Joined: 2011-11-02T21:38:48-07:00
Authentication code: 8675308

Can't convert 1x# pixel images

Post by cwolves »

I have an automated script that generates image sprites. Long story short, it's failing on 1x# pixel images (that is any image that is one pixel wide).

A very simplified example that gets run:

convert -strip -size 1x66 xc:transparent -draw 'image over 0,0 0,0 "/path/to/foo.png"' /path/to/sprite-1.png

This works fine on 2x#, or #x1 images.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Can't convert 1x# pixel images

Post by anthony »

The -strip does not make any sense in that position, but it does not seem to make a different if it is their or not.

What does happen, and you did not say, is that the command does not crash, but exits normally. However the image is NOT overlaid on the 1 pixel wide canvas. It does for a one pixel high canvas, but not for a one pixel wide canvas.


BUG is confirmed.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: Can't convert 1x# pixel images

Post by glennrp »

I obsserved the same behavior when I used txt instead of png format.
(IM-6.7.3-3)
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Can't convert 1x# pixel images

Post by anthony »

I was using show: for output and rose: for input in my own tests

so it is definitely a -draw problem not a file format problem.

Also it works find if you use #x1 sized canvas image instead of 1x#
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Can't convert 1x# pixel images

Post by magick »

We can reproduce the problem you reported and have a patch in ImageMagick 6.7.3-5 Beta available by sometime tomorrow. Thanks.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Can't convert 1x# pixel images

Post by anthony »

Confirmed in the SVN.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply