PNG decompression using zlib

How can I use the zlib library to unzip a PNG file? I need to read a PNG file using the C compiler under gcc.

+3
source share
4 answers

I have some code, once the base Java library for reading / writing PNG files: http://code.google.com/p/pngj/

It does not support images on pallets, but besides this [Updated: it supports all PNG options now], it is quite complete, simple and the code has no external dependencies (that is, it uses only the standard JSE API, which includes ZIP decompression ) And the code is available. I think you could shift it to C with a little effort.

+2
source

Why not use libpng ? The PNG file format is quite simple, but there are many different possible encoding options and methods, and it can be quite tedious to cover all cases. Something like libpng handles all conversions and stuff for you automatically.

+4
source

, C, PNG: http://www.w3.org/TR/PNG/. , , PNG ? , , - , .

PNG , . , PNG , C gzip- ( , , , )

, , , PNG . Python, , , C.

+2
0

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


All Articles