Kilian / Trimage

A cross-platform tool for optimizing PNG and JPG files.
http://trimage.org
MIT License
706 stars 55 forks source link

wish: better jpeg compression level #13

Closed zeroheure closed 12 years ago

zeroheure commented 13 years ago

This was previously discussed by email: Trimage losslessly compresses images, but jpeg format can't compress losslessly, even in top high quality. One thing that can satisfy everybody would be to add an option in the config file for jpeg default compression level. The config file could be located in user's home and (or) in /etc. That option, would not be available from graphical interface, and documented only in the man page and the Readme. Sysadmins loves these sort of features (Im sysadmin)!

Kilian commented 12 years ago

I'm sorry for the way overdue reply. I do not want to offer lossy compression in trimage. Sysadmins and other people that want more granular control and different types of compression are better served by the already existing command line tools that offer that.

zeroheure commented 12 years ago

Soory for arguing again, but I think you misunderstood the problem: sysadmins (like me) need to offer easy to use and sexy tools to end users. Even for personal use (wife, childrens and mother!...). If jpeg compression level for Trimage can be set in a config file in user's home directory, that will make Trimage a useful tool, more sexy to use than a bash script. Default jpeg compression would still be set at 100 (no compression at all).

Kilian commented 12 years ago

No problem, discussion can only make things better :) However, Trimage is made for a very specific purpose: losslessly compressing images for publishing on the web. As such, Trimage's goal is to minimise the size of images as much as possible without losing image quality.

To do this, one of the things is does is throw away all metadata such as the date a photo was taken. This makes is a bad tool to use for i.e. end users wanting to minify their photo albums. Trimage currently does a bad job of properly communicating that, and it's an area in which we need to improve.

zeroheure commented 12 years ago

Well, I find Trimage to be the best tool to help users publish sending pictures on the web or by email. Because while they understand the problem of pixel size, compression is a black hole for them. I understand your point of view. But adding an option to read jpeg compression level in something like ~/.trimage file is easy and not intrusive. No need to have this in GUI. Default would still be no compression at all.

Kilian commented 12 years ago

The value in Trimage is also, partially, the guarantee that it will never make your images hideous.

I can see some value in allowing users to specify the compression options via command line parser options. i.e. trimage -f file.png --optipng="-force -o3" --jpegoptim="-m 50", though I'm afraid that is already more customization than I want to offer. However, would something like that be useful for you?

zeroheure commented 12 years ago

Sorry for answering so late.

It would be useful, yes.