Simple C++ library for reading pngs
Loading and saving images is usually not too simple; I recently discovered png++[http://www.nongnu.org/pngpp/doc/0.2.0/], which makes it really really simple.
after installing, just #include <png++/png.hpp>
and then you can do code like:
png::image< png::rgb_pixel > img("myimage.png");
and you have img.getwidth(), img.getwidth(), and image[row][col] to get the pixel data. To save back, just do img.write("other.png").
Written by Orlando Karam
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#C
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#