Transparency in sub-image search result

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
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Transparency in sub-image search result

Post by anthony »

If I do a sub-image search on a GIF image which has a transparency channel the resulting 'map' has random transparency in the result...

Code: Select all

convert http://www.imagemagick.org/Usage/images/colortable.gif \( +clone -crop 50%x+0+0 \) miff:- | compare -subimage-search -  | convert - -delete 0 result.png
This downloads a GIF image, crops a 50% sub-image and feeds them to compare.
The second 'map' image (which is what we are interested in) that is generated by compare has some random transparency in it.
There should be no transparency as it is a grayscale map of 'color distances'.

The transparency in that map should not exist, and looks like undefined random memory data.
Turning off the alpha channel before the final save works, but should have been performed by the "compare" program...


ASIDE: compare, and sub-image compare should be merged into IMv7 "magick".
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: Transparency in sub-image search result

Post by magick »

We can reproduce the problem you posted and have a patch in ImageMagick 6.8.3-7 Beta available by sometime tomorrow. Thanks.
Post Reply