开发者

Help converting a bitmap to a png in memory using libpng

开发者 https://www.devze.com 2023-01-17 03:02 出处:网络
Basically I would like to convert a bitmap to a png using libpng but rather than outputting it to a FILE* I would like to output it to a char*. I have already seen this related post but I don\'t see w

Basically I would like to convert a bitmap to a png using libpng but rather than outputting it to a FILE* I would like to output it to a char*. I have already seen this related post but I don't see where the bitmap data i开发者_StackOverflows actually used. Any help would be appreciated.


Use the png_set_write_fn function to redirect writes to your own function; this function, which you need to write, can store the output in any way you want.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消