possible bug -alpha shape IM 7

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
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

possible bug -alpha shape IM 7

Post by fmw42 »

There is a difference in how -alpha shape works between IM 6 and IM 7, but no difference for -alpha copy. In -alpha shape for IM 7, you need to add -negate. I know that IM 7 alpha channels are opposite polarity from IM 6. But I do not think this should be this way as a matter of consistency.

Examples from http://www.imagemagick.org/Usage/masking/#alpha_copy and http://www.imagemagick.org/Usage/masking/#alpha_shape

Image

-alpha copy:

Code: Select all

convert alpha_extract.png -alpha copy alpha_copy6.png
Image

Code: Select all

magick alpha_extract.png -alpha copy alpha_copy7.png
Image


-alpha shape:

Code: Select all

convert alpha_extract.png -background red -alpha shape alpha_shape6.png
Image

Code: Select all

magick alpha_extract.png -background red -alpha shape alpha_shape7a.png
Image

Code: Select all

magick alpha_extract.png -background red -negate -alpha shape alpha_shape7b.png
Image
Post Reply