Search code examples
c++cimage-generation

Library to generate Images with pixels


I'm looking for a Library that allows me to generate an Image via pixel information, in this style(dummyfunction):

/*
 coord_x = X coordinate
 coord_y = Y coordinate
 red     = red part of RGB
 green   = green part of RGB
 blue    = blue part of RGB
*/
setPixel(int coord_x, int coord_y, int red, int green, int blue)

Is there such a Function? I've searched libpng, but it doesn't appear to allow to set pixels manually (might be wrong, though)...

Prefered formats for output would be PNG, GIF would be acceptable, JPG will probably not work (due to compression and lack of transparency as in PNG and GIF).


Solution

  • I'd use Boost.GIL.