Optimise Compression

Dolphin Service Menus

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

1
Score 70%
Description:

This collection of KDE service menus allows you to *losslessly* optimise the sizes of various files. Possible use includes:

* creating smaller e-mail attachments
* speeding up your Web site (since the files will download faster)

The service menu files are as follows:

* optimise_png.desktop - for PNG files
* optimise_mng.desktop - for MNG files
* optimise_zip.desktop - for Zip-based files, including
- OpenOffice.org/StarOffice documents and templates (.sx?, .st?)
- OASIS OpenDocument (.od?, .ot?)
- Java archive (.jar)
- Mozilla extensions (.xpi)
* optimise_gzip.desktop - for GZip-based files, including
- AbiWord documents (.abw.gz, .zabw)
- DVI (.dvi.gz)
- PostScript (.ps.gz)
- bitmap fonts (.bdf.gz, .pcf.gz, .snf.gz)
- Tar (.tar.gz, .tgz)
- SVG (.svgz)
- VRML (.wrl.gz)

AdvanceCOMP [http://advancemame.sourceforge.net/comp-readme.html] is required to be installed for this functionality. In addition, PNG files may be optimised using OptiPNG [http://www.cs.toronto.edu/~cosmin/pngtech/optipng/]. Most PNG files are best optimised by running OptiPNG followed by AdvanceCOMP, but some are better optimised after using only one of these tools. Results will vary depending on the file.

Note that these processes are extremely CPU-intensive. If you have a slow system or are optimising many files at once you might prefer the "default" over the "maximum" optimisation options. The difference at the end is likely to be nominal. The processes run in the background, so you should be able to carry on with other tasks in the meanwhile.

In some cases, the AdvanceCOMP tools may deliver a CRC error and refuse to optimise the file. This does not damage the file.

To install, copy the .desktop files to ~/.kde4/share/kde4/services/ServiceMenus/

The service menus have been tested with KDE 4.1, but I believe they should work with earlier versions that support service menus.

NB: This project was formerly known as "Optimise PNG".

Last changelog:

10 years ago

2009-01-31
Version 1.6
* Compatible with KDE4 (thanks to Pierre Buard)
* French translation (thanks to Pierre Buard)

2005-05-22
Version 1.5
* Better visual feedback:
- Output is displayed inside a konsole window
- A passive pop-up lets the user know that the process has commenced

2005-05-08
Version 1.4
* Added support for GZipped AbiWord (.abw.gz and .zabw), DVI (.dvi.gz), bitmap
fonts (.bdf.gz, .pcf.gz, .snf.gz), Tar (.tar.gz, .tgz), VRML (.wrl.gz),
OpenOffice.org/StarOffice documents and templates (.sx?, .st?), OASIS
OpenDocument documents and templates (.od?, .ot?), Java archive (.jar) and
Mozilla extensions (.xpi)
* split optimise_compression.desktop into optimise_gzip.desktop and
optimise_mng.desktop

2005-05-01
Version 1.3
* Added support for GZipped SVG (.svgz) files
* Performance enhancements:
- files are now processed sequentially rather than in parallel
- files are now processed in the background

2004-11-08
Version 1.2
* Renamed project to "Optimise Compression" to reflect feature enhancements
* Added support for Zip (.zip), GZip (.gz, including .tar.gz), and MNG (.mng)
files

2004-11-03
Version 1.0
* Named "Optimise PNG"
* Optimise PNG files only

Vewyn

8 years ago

I had to make some modifications to the servicemenus for use with KDE 4.5.5. In the mimetypes, a comma separator is being used when what is required is for a semicolon to be used. I'm not sure if this is something that has changes or if it has been broken all along, but I had to make this change to get my menus to work. with zip variants.

I haven't used the zip optimization until now, but the problem only presents itself with the zip and gzip.desktop files because these are the only ones using multiple mimetypes.

You may want to update these files... or the user can modify the two files themselves.

Report

pbuard

9 years ago

I made a package for Arch Linux, it's available in AUR: http://aur.archlinux.org/packages.php?ID=32110

Report

martosurf

8 years ago

Thanks you both guys!

Report

Vewyn

13 years ago

I haven't used the 1.5 version much since upgrading, so there is something I just noticed. I used to be able to select an antire directory of .png files and the service menu would pop up and let me optimise an entire directory. Now this functionality has been lost. I'm certain it's not with KDE because the previous version (1.4) of the service menu worked perfectly under it.

Report

Vewyn

13 years ago

Nevermind the bug report - I didn't notice one single non-png file file in the directory and that was all it took to cause the problem.

Report

phxguy

13 years ago

I get an error when i try to use the OptimisePNG

nice: optipng: No such file or directory

Any Ideas....

Report

C

Yama

13 years ago

Do you have optipng installed into your PATH?

Report

jstaniek

13 years ago

You're making garbage out of kde-look: please only add your application stuff for kde-apps.org, not to both.

Report

C

Yama

13 years ago

What are you talking about? Service menus are automatically added to both kde-look and kde-apps.

Report

asdex

14 years ago

I'm not impressed by the performance of AdvanceCOMP and OptiPNG.

OptiPNG shows really bad results while AdvancedComp shows results comparable to the older and reliable PNGCrush.

I don't know why I should use those programs.

Just save your large PNGs with "compression=9" (when using Gimp).

Report

C

Yama

14 years ago

Applying OptiPNG followed by AdvanceCOMP on a PNG can deliver far superior compression over simply saving as compression=9, without any loss in quality. This is especially useful if you want to host a large picture on the Internet -- a smaller file will download faster.

OptiPNG is a (superior) replacement for (the seemingly unmaintained) Pngcrush. AdvanceCOMP is something completely different -- it converts the Ziv-Lempel compression to 7-Zip, thereby squeezing things even more.

Obviously nobody is forcing you to use these tools. If you don't have the patience to use these tools, don't use them. But it would be ridiculous to deny that they are capable of creating significantly smaller file sizes. They don't always (that depends on the properties of the file you are working on), but often they do.

Report

Vewyn

13 years ago

Yama: I'm not certain if it is necessary or even feasible to use OptiPNG before using AdvanceCOMP. In most of the cases I've come into thus far, AdvanceCOMP would produce a larger file when used after OptiPNG. It appears that on truecolor bitmaps, OptiPNG is producing a better result than AdvanceCOMP, but on greyscale images AdvanceCOMP is clearly producing a lower file size by itself. It looks like it now has the functions to reduce the color map according to the content, thus stacking it with OptiPNG doesn't seem to make alot of sense. Also, AdvanceCOMP does not want to accept 8-bit input (newest version - I don't know about older), so using OptiPNG beforehand is not even an option on some images.

The conclusion I come to is that each utility has it's strengths an weaknesses dependant upon which type of input you choose. AdvanceCOMP IS significantly faster than the other tools that go through the trial-and-error sequence to get the best file size possible.

For the other users speaking of other tools - pngcrush IS unfortunately outdated. I have been getting the same or better results out of OptiPNG and pngout. I'm not saying it's not good...I'm saying it's not the only good one.

Report

C

Yama

13 years ago

Obviously, results will vary depending on the file you use. That is why I provide separate optipng and advancecomp options instead of lumping them them together into one command (as one user has requested). All I can suggest is that you experiment and find what's best for you.

Report

Vewyn

13 years ago

Edit: AdvanceCOMP does work with 8-bit files, but not all.

Report

asdex

14 years ago

I have done different tests. Compared to pngcrush the results were not worth the "two-pass" pain. At least for me.

Report

C

Yama

13 years ago

I have looked into pngcrush and I've concluded that it is not worth adding. The document "A guide to PNG optimisation" [http://www.cs.toronto.edu/~cosmin/pngtech/optipng.html] explains how OptiPNG outperforms pngcrush both in speed and in file size. Pngcrush has not been modified since 2002, so it is effectively a dead project. OptiPNG does optimisations in memory, and is able to overwrite the original file. Pngcrush must write to a separate file, making file conversions unnecessarily complicated (you need to manually delete the original file and rename the new one to take its place).

Report

eusonig

14 years ago

Some messages from the service menu could be useful.
The minimum will be a message box with the text "Process finish", as you can see in "Mount ISO image" service menu.

Report

C

Yama

14 years ago

Good idea.

My initial hope was to display the advpng output in a terminal, but the "Terminal=true" option doesn't seem to work in service menus.

I'll see what I can do.

Report

Vewyn

13 years ago

I found a solution that works for ME with this service menu. I was playing around with the PNG compression routines here because the service menu seemed to time out when using max compression. I wanted shell output to see if this was the case, as well as to see what the output results were for comparison. It was a simple matter of piping the command through "konsole". Here's how I modified the command syntax in the service menu file for OptiPNG-max:

Exec=konsole -T "OptiPNG Max Compression" --noclose --nomenubar --notoolbar -e nice -n18 optipng -preserve -o7 %F

For AdvanceCOMP-max:

Exec=konsole -T "AdvanceCOMP Max Compression" --noclose --nomenubar --notoolbar -e nice -n18 advpng -z -4 %F

For the user that was griping about using OptiPNG - Why don't you look at the command lines and just modify them, subbing in your own preferred tools instead of complaining about the authors choices? It's really not that difficult. I hope this info helps the author and users.

Report

C

Yama

13 years ago

Thanks for letting me know. I had tried using "konsole -e" before (in KDE 3.3), but it didn't work. It seems to work well in KDE 3.4, so you can expect it to be in version 1.5.

Report

Sebien

14 years ago

No.
A Finished dialog woun't be good for usbility because:
- You don't know it was started
- You are bored of the message needing a click

I propose you to put a progress dialog like Ark do.
Try it: right click an archive file and choose Actions -> Uncompress here.
A dialog with "animated progresbar" is shown during the uncompresing. And closed after!

Would be very good.

And no: showing the output of the Terminal is not very user friendly in a GUI environment

Report

nuka

14 years ago

but how about a "do both" option?

Report

10 years ago

2009-01-31
Version 1.6
* Compatible with KDE4 (thanks to Pierre Buard)
* French translation (thanks to Pierre Buard)

2005-05-22
Version 1.5
* Better visual feedback:
- Output is displayed inside a konsole window
- A passive pop-up lets the user know that the process has commenced

2005-05-08
Version 1.4
* Added support for GZipped AbiWord (.abw.gz and .zabw), DVI (.dvi.gz), bitmap
fonts (.bdf.gz, .pcf.gz, .snf.gz), Tar (.tar.gz, .tgz), VRML (.wrl.gz),
OpenOffice.org/StarOffice documents and templates (.sx?, .st?), OASIS
OpenDocument documents and templates (.od?, .ot?), Java archive (.jar) and
Mozilla extensions (.xpi)
* split optimise_compression.desktop into optimise_gzip.desktop and
optimise_mng.desktop

2005-05-01
Version 1.3
* Added support for GZipped SVG (.svgz) files
* Performance enhancements:
- files are now processed sequentially rather than in parallel
- files are now processed in the background

2004-11-08
Version 1.2
* Renamed project to "Optimise Compression" to reflect feature enhancements
* Added support for Zip (.zip), GZip (.gz, including .tar.gz), and MNG (.mng)
files

2004-11-03
Version 1.0
* Named "Optimise PNG"
* Optimise PNG files only

product-maker martosurf Sep 22 2010

product-maker 37 90

File (click to download) Version Description Downloads Date Filesize DL OCS-Install
Pling
*Needs ocs-url or ocs-store to install things
Details
license
version
1.6
updated Jan 31 2009
added Nov 03 2004
downloads today
1
page views today 1
System Tags addon