Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
基本上,我想使用 libpng 将位图转换为 png,而不是将其输出到 FILE*,我想将其输出到 char*。我已经看过这个相关的帖子,但我没有看到位图数据的实际使用位置。任何帮助,将不胜感激。
使用该png_set_write_fn函数将写入重定向到您自己的函数;您需要编写的这个函数可以以您想要的任何方式存储输出。
png_set_write_fn
请参阅http://www.libpng.org/pub/png/libpng-manual.txt上的文档