Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Problem Reading PNG with Transparency layer

I'm using 2.3.1 and am having problems loading a PNG file. An example picture is given below. Apparently the background of this image is transparent. You can see this because I can grab the alpha layer using imagemagick. The output from imagemagick is shown below. The problem is that when I load the image using imread, the matrix becomes the output shown below. I have tried loading the image with -1, 0, and 1 as flags and nothing has helped. When I load it with -1, it has 4 channels, but the 4th channel just contains all zeros. Has anyone seen something similar to this before? image description image description image description