I'm looking for a way to decode some png file, I heard about libpng, but I don't understand how this one works. Does it convert the png file into an array of bytes in the ARGB8888 format or something else ?
A:
You might be better off looking at a dedicated image library that will decode the image for you and return it in a recognised structure. It'll also serve as a better platform when you want to actually do something with the image (saving, displaying, etc).
Alan
2009-09-01 15:11:24
A:
I've got code that uses it here: http://code.google.com/p/kgui/source/browse/trunk/kguiimage.cpp
Just look at the function kGUIImage::LoadPNGImage
Note: Although libpng does decompress the image for you, it can return it as 1,2,3,4,5,6,7,8,16,24,32,48,64 etc bits per pixel so you need code to handle each case.
KPexEA
2009-09-02 01:07:32