Kalamarico
Kalamarico

Reputation: 5666

Compression and decompression of png files

In my web project, i compressed all PNG images with optipng, with -o3 compression. In modern browsers all is fine, the visualization is not affected and all runs ok. But, i have an old device with a custom browser engine that have problems with compressed images. So i need to decompress the images, is this possible? If i open the images with GIMP (for example) i can save the png file again with a 0 compression, i want to ask if there are any "automatic" tool that can do that. With optipng i can't.

Upvotes: 1

Views: 4991

Answers (2)

max
max

Reputation: 4348

If I understand your question properly, of course its possible.

Just use IrfanView and run it in batch mode on all your files.

If you're not using Windows, ImageMagick is probably the best way to go. Just write a script which runs the following command on all your files:

convert -quality 0 input.png output.png

Upvotes: 1

blganesh101
blganesh101

Reputation: 3695

I believe you can use Zlib to decompress the png compressed with optipng

`zlib.decompress(file,level)` //python usage

Upvotes: 1

Related Questions