I grew impatient with the Bash scripts that are often included with iconsets here at kde-look. I also happen to be learning Python so I took a stab at writing a buildscript in Python for fun and to see if there would be any differences between Bash/convert and Python/PIL. This is what I found on my machine (1.7G Pentium 4, 512 RAM) using 3 different iconsets:
Dark-Glass:
http://www.kde-look.org/content/show.php/Dark-Glass+reviewed?content=67902
buildscript.py:
5m17s
66M Dark-Glass-2.4.tar.bz2
98M Dark-Glass - uncompressed
buildscript.sh:
18m47s
125M Dark-Glass.tar.bz2
165M Dark-Glass - uncompressed
Leopard-Style:
http://www.kde-look.org/content/show.php/Leopard-Style?content=71732
buildscript.py:
1m9s
12M Leopard-Style-0.4.tar.bz2
22M Leopard-Style - uncompressed
buildscript.sh:
4m34s
24M Leopard-Style.tar.bz2
38M Leopard-Style - uncompressed
Breathless:
http://www.kde-look.org/content/show.php/Breathless?content=60465
buildscript.py:
11m21s
135M Breathless-1.1.tar.bz2
204M Breathless-1.1 - uncompressed
buildscript.sh:
33m42s
268M Breathless.tar.gz - included script used gzip instead of bzip2
336M Breathless - uncompressed
One main difference between buildscript.py and buildscript.sh is that buildscript.sh uses convert from ImageMagick which when resizing 8-bit icons it converts the icons to 16-bit. This increases the time in conversion and space in storage, but there are no gains because you can't get any more information from 8-bit to 16-bit conversion. I carefully looked at the icons and I see no difference between them. The 16-bit conversion would only be valuable in converting from higher bit or raw images, not lower bit images.
Please give this script a try and please tell me if I am wrong.
REQUIRE

Python-2.5.1
Python Imaging Library-1.1.6
Versions are only tested versions, other versions may or may not work.
ImageMagick's convert for the odd .xpm file.
Ratings & Comments
6 Comments
Many many TKS for the script , you are a genius. Prox release of Dark-Glass implement it. p.s. i know to do a script like a fish know to do equations (anyone have is job) ;-)
Cheers Mentalrey, glad you found it useful. It's the least I can do in return for your awesome iconset! I only wish I could do more. LocoMojo
...sorry about the double post. LocoMojo
Very nice, it seems to produce much clearer icons at at smaller sizes, good job.
Thanks. I can especially see some faster degradation in the 16-bit icons converted from 8-bit than the 8-bit to 8-bit icons so there is definitely some differences. This script provides faster building, less space used in storage, and less degradation in the icons. I only did this for fun and I was pleasantly surprised at the result. Hope someone out there finds this script useful. Cheers, LocoMojo
Thanks. I can especially see some faster degradation in the 16-bit icons converted from 8-bit than the 8-bit to 8-bit icons when I enlarge them to get a closer look so there are definitely some differences. This script provides faster building, less space used in storage, and less degradation in the icons. I only did this for fun and I was pleasantly surprised at the result. Hope someone out there finds this script useful. Cheers, LocoMojo