Misread 4 channel PNG File
This PNG file: http://azureabstraction.com/upload/files/aaron/linked_to_from_permenant_places/stuck_up_european_input.png
Does not read in properly with this test code: http://azureabstraction.com/upload/files/aaron/linked_to_from_permenant_places/matte.cpp.txt
Using the 0.11 version of the OIIO library.
When I run the simple cpp program, I get this output: Channels names: RGBA Format: uint8 Quantization: 0 255 0 255 Resolution, channels: 666 890, 4 First 4 channels: 0 0 0 255
(I expect the first four channels to not indicate a black pixel).
And the output image is this: http://azureabstraction.com/upload/files/aaron/linked_to_from_permenant_places/stuck_up_european_output.png
When I open the input image in Paintbrush and save it out again (as stuck_up_european_input2.png for example), it is read in and written out as I expect. (So this is a workaround for my project). But it does seem that whatever is different about this particular PNG file, it should be process properly by this simple program (as it opens in viewers properly).
As I am fairly new to graphics, I cannot diagnose what is special about this PNG further.
The main problem here is that OIIO has a bug interpreting PNG files which simultaneously contain a gamma specification and an alpha channel. In particular, the associateAlpha function is seriously buggy. I'd post a fix, but the semantics of png's "gamma" is tripping me up so I'm holding off for now.
I just pushed a fix for this to the master branch, it should now behave as expected.