How to install Trimage image optimizer on Linux?
I did it this way:

Code:
wget https://github.com/Kilian/Trimage/archive/master.zip
unzip master.zip
cd Trimage-master
python setup.py install

or mirror:


Code:
wget http://internetlifeforum.com/files/Trimage.zip
unzip Trimage.zip
cd Trimage-master
python setup.py install

or debian:


Code:
apt-get install trimage

then i see Trimage installed:


Code:
man trimage

TRIMAGE(1) User Commands TRIMAGE(1)

NAME
trimage - losslessly optimizing png and jpeg liles


SYNOPSIS
trimage [options]


DESCRIPTION
Front-end to compress png and jpeg images via optipng, advpng, pngcrush and jpegoptim.


OPTIONS
-d directory, --directory=directory
Compresses images in directory.


-f filename, --file=filename
Compresses image.


-h, --help
Show help message.


-q, --quiet
Quiet mode.


-v, --verbose
Verbose mode (default).


--version
Show program version number.


SEE ALSO
advpng(1), jpegoptim(1), opt-png(1), opt-jpg(1), pngcrush(1), pngrecolor(1), pngstrip(1)


trimage 1.0.5 2011-07-11 TRIMAGE(1)


So to optimize image, one do command:

Code:
trimage -f filename.jpg
trimage -f filename.gif

To optimize images recursivelly:

Code:
find /home -type f -name "*.jpg" -o -name "*.png" -exec trimage -f {} \;
(i would backup before running that on /home)

This eror can happen on Trimage run:
Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/trimage/trimage.py", line 14, in <module> from PyQt4.QtCore import *ImportError: No module named PyQt4.QtCore
It is mentioned to do: apt-get install python-qt4
But on CentOS, python-qt4 is not there. There is "yum install PyQt4", but it request to install 40Mb of SW.. :/