C function to convert raw image to png

Is there any c function that allows me to convert a raw image to a PNG file? Preferably, for this I do not need to drag a large library.

Thanks.

+3
source share
4 answers

I don’t believe that. Libpng , on the other hand, is not a huge library.

+13
source

Have you tried the libpng library?

http://www.libpng.org/pub/png/libpng.html

+5
source

See the related question: Convert a bitmap in PNG to memory in C ++ (win32)

The short answer is that GDI + can convert a bitmap to PNG (with some limitations), so if you're on Windows, this is an option that is even more minimal than libPNG.

+1
source

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