Description: This is simple script which compress losslessly your selected png file(s). If none file is selected it compress all png file from folder. I did write it about two years ago,but I didn't publish it because I thought that it is to simple, but then I realized that someone can don't know bash or about optipng. There are three scripts in package. Default one use default optipng flag, o5 is slower but can give smaller file, o7 is even slower. Usually default is enoughm but for a logo of website etcm you may want to optimize it as much as you can. You can find more flags in man optipng. To use them in script simple change line: flag = ""
IMPORTANT: You need to install package optipng (for example for Debian/Ubuntu sudo aptitude install optipng)
How to use: Unpack and copy or link it to ~/.gnome2/nautilus-scriptsLast changelog:
1.01 check for optipng added, files with o5 and o7 flags added to package
There is an alternate way to do the same thing in Gimp which creates a smaller image. Just uncheck all the defaults when you save the image, no checks will create a standard PNG and it will be smaller in size.
Ratings & Comments
7 Comments
Thank You !!!!! Now I can convert on the fly. I would like it to crunch more. But it rocks as is as well.Thanks again !!!!
have error when run your script : "There was an error creating the child process for this terminal". Help me please ! My system: Ubuntu Intrepid.
Oh, I need add package optpng :)
I modified the script to give a info when you don't have optipng installed. I hope that it works:D
Using xterm instead of zenity was probably overkill from my side, by didn't want to check another package :D
There is an alternate way to do the same thing in Gimp which creates a smaller image. Just uncheck all the defaults when you save the image, no checks will create a standard PNG and it will be smaller in size.
Yeap, Gimp can optimize png, but not as much as optipng. You can still compress what you get from gimp using optipng.