Search code examples
c++.netpng

Easy to use PNG lib?


Could someone recommend me a simple, easy to use PNG library either for c++ or .NET? All it needs to do is: load big PNG images (say 20000x20000), and tell me what color each pixel has.

Bitmap class in .NET can't load big images, throws an OutOfMemory exception.

I spent reasonable time on google looking through c++ libs, but all of them does much more than I need, and their usage is too complicated for me.


Solution

  • The defacto standard library for PNG files is LibPNG. It's not the best designed API in the world, but if you just work through the steps in one of their tutorials, it's pretty hard to mess up.

    You'll probably find it easiest to wrap their API in a few simple functions (or class) of your own. Once you have that done, you should be good to go.