Search code examples
c++pngnintendo-ds

Saving an array of colour data as a PNG file on DS


I'm looking for a library to save an array of colour data to a PNG file. (That's all there is to it, right? I know very little about the internals of a PNG.)

This is for use in Nintendo DS development, so something lightweight is preferable. I don't need any other fancy features like rotation, etc.


Solution

  • To encode any kind of PNG file, libpng is the way of the walk.

    However, on small devices like the DS you really want to store your image data in the format which the display hardware expects. It is technically possible to get libpng working on the platform, but it will add significant overhead, both in terms of loadtimes and footprint.