Search code examples
macosimagepng

How to dump out an array of pixels as a png?


I'm on MacOSX.

I have read out an image, as

char image[WIDTH][HEIGHT][3]; // row, col, rgb value

Now, I want to dump it out as a png file. What is the quickest way to do this?


Solution

  • http://zarb.org/~gc/html/libpng.html <-- amazing tutorial.