I've just started trying out the Magick++ API. I'm trying to use something roughly like this:
This particular image (which can be found here - http://www.libpng.org/pub/png/img_png/IceAlpha-0.5.png ) is an 8-bit palettized PNG with a transparent background.
The problem that I'm seeing is that I'm getting an exception thrown from ExportQuantumPixels (in quantum-export.c), due to this block of code:
if (image->storage_class != PseudoClass)
The storage_class is currently set to DirectClass, which I believe is the bug. The reason it's DirectClass is because of ReadOnePNGImage (in png.c), where it handles the transparent background chunk:
if (ping_info->valid & PNG_INFO_tRNS)
Image has a transparent background.
I'm a n00b to ImageMagick as a whole, so there's a lot going on in this function that I don't understand, but I can't see why the storage_class would get forced to DirectClass here. I would have expected it to preserve the palettized nature of the image.
On the other hand, if it's trying to convert it to direct pixels due to compositing with the background color or something similar, then I guess the bug would be that it's preserving the image colormap that was already created prior to this point, and it needs to release the colormap, reset the number of colors and bit depth, etc.