Sign in to follow this  

LodePNG (for loading/saving game textures) now for C!

This topic is 3627 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, I have already posted about LodePNG here before, but, it used to be for C++, but now it's for C, with still a C++ wrapper around it that has the same interface as the old C++ version. It being for C now makes it more portable. It allows reading PNG images without any dll's needing to shipped with the program, nor linking to zlib and libpng required, because both the zlib and png encoding and decoding math is all placed in 1 .c or .cpp file. It's tested to work with gcc/g++, DevC++, Comeau C/C++ and Visual Studio 2005. Also, both the C and the C++ version allow reading an arbitrary PNG image into an unsigned char-buffer, automatically converted to 32-bit RGBA color, that can be immediately used for a Direct3D or OpenGL texture, in 1 function call! The link is here: http://members.gamedev.net/lode/projects/LodePNG/ I hope it can be useful to someone!

Share this post


Link to post
Share on other sites
Sign in to follow this