PNG8 + PicoPNG

Monkey Forums/Monkey Programming/PNG8 + PicoPNG

AdamRedwoods(Posted 2013) [#1]
At some point i'd like to see PNG8 (4-bit png) support, since for mobile this uses less memory (GL_UNSIGNED_SHORT_4_4_4_4). might be faster, too.

i was able to get PicoPng working for GLFW and loading PNG8 color indexed files, after it converted them to RGB32:
http://lodev.org/lodepng/

Nice and small, fits easily into stbimage, and license is good. Something to think about.

Cpp code to interface to stb_image (swap out the stbi_load_from_file for png):


EDIT: sorry, not drag-n-drop, i forgot i modded picopng to return the image depth.

EDIT2: ahh, it's in Android. I don't see it in iOS. ok, maybe this is only needed for GLFW!