PDA

View Full Version : Image Converter



Luuk van Venrooij
03-10-2009, 06:25 PM
He All,

At work we recently changed are gaming website backend to run on the google app engine. Google now handles the scalling of the servers we need without us having to change anything:). But since google charges us money for bandwidth, cpu usage, storage space etc it is vital to make everything as optimal as possible:) So we examined are game packages again and found that if we switched some of our used image formats we could compact them 10 to 30%. The artists didn`t like the idear of converting 7500+ textures so we looked arround for a program to batch convert them but couldn`t find one that fitted al our needs.

So I decided to write one:) My image converter can scan folders recursively and find BMP, JPG, DDS, TGA and PNG files. These can then be converted to one of the mentioned 5. When saving the convertor can optionally reconstruct the folder structure from which they came. A cool feature is that this program is multithreaded and uses al of your cpus/cores to convert the images with only the harddisk speed as limitation.

The program uses the vampyre image library (http://imaginglib.sourceforge.net/) for loading, converting and saving the images.

A little screenshot showing conversion of a batch of old vacation photo`s on my dual core machine:) 3 threads used, one for the application and 2 for image converting. CPU load almost 100%:)
http://img101.imageshack.us/img101/6022/stuffz.th.jpg (http://img101.imageshack.us/i/stuffz.jpg/)

Here is the download link with as always full source under LGPL licence.
http://www.genesisdevice.net/downloads/imageconverter.zip

Grtz,

Luuk