8-bit PNG won't load in GLFW

Monkey Forums/Monkey Bug Reports/8-bit PNG won't load in GLFW

Snader(Posted 2013) [#1]
I was optimizing my files by creating 8-bit versions of a lot big PNG files. It decreased my Android APK size dramatically!

Now I wanted to create a windows program using GLFW. The game compiles perfectly, but when executed, it crashes when it tries to display an 8-bit PNG file. When replacing it with the 32-bit version, it works. The game doesn't crash on the loading part though, only when it tries to display them with a Memory Access Violation. They simply aren't loaded...

If (fOverlay) Then DrawImage(fOverlay, VDeviceWidth(), 1)

this prevents the crash, but now my images ain't shown!


Soap(Posted 2013) [#2]
How did you save to 8-bit? Use a different program when saving 8-bit versions.

http://monkeycoder.co.nz/Community/post.php?topic=257&post=1670

Try using one of these

http://psydk.org/PngOptimizer.php
http://www.ardfry.com/pngoutwin/
http://www.advsys.net/ken/utils.htm
http://optipng.sourceforge.net/


Snader(Posted 2013) [#3]
I use Adobe Fireworks. The PNGoptimizer didn't solve it. Will try more programs next week!


AdamRedwoods(Posted 2013) [#4]
no, Monkey's GLFW stb_image library does not support PNG8. only PNG24/32.

Monkey should try to incorporate libpng to support that.