Help convert bitmap to png in memory using libpng

Basically, I would like to convert the bitmap to png using libpng, and not output it to FILE *. I would like to output it to char *. I already saw this linked post, but I don’t see where the raster data is actually used. Any help would be appreciated.

+3
source share
1 answer

Use a function png_set_write_fnto redirect entries to your own function; this function you have to write can store the result in any way.

See the documentation at http://www.libpng.org/pub/png/libpng-manual.txt

+4

Source: https://habr.com/ru/post/1765382/


All Articles