I have a need to read in the exact unaltered pixel data (ARGB) from a truecolour PNG file, preferably from PHP.
Unfortunately the GD library in PHP messes with the alpha channel (reducing it from 8-bit to 7-bit), making it unusable.
I'm currently assuming that my options are either:
Implement my own raw PNG reader to extract the necessary data.- Use some less-broken language/library and call it from the PHP as a shell process or CGI.
I'd be interested to hear any other ideas, though, or recommendations for one way over the other...
Edit: I think #1 is out. I've tried passing the IDAT data stream to gzinflate(), but it just gives me a data error. (Doing the exact same thing, with the exact same data, outside of PHP produces the expected result.)