Archive for December, 2007

JAI saves the day

Posted on December 23rd, 2007 by Dalton Filho

A while ago I was working on a new feature of a CG project that involved loading hundreds of textures from disk. So far, so good. The images, however, were like an order from the devil: I needed RGBA images, but the images were all in BMP format (no chance for alpha channels) and splitted. How great is that?! To solve this problem, I had two alternatives: the first was joining and converting the images manually. If you consider the ammount of images (422) and the average time to join and convert them (aprox. 3 minutes), that would take more than 21 hours (assuming the bore factor wouldn’t spoil my productivity in the meanwhile). Fortunately, there was a second alternative: automating the whole process. As I could not find a program that could supply my very specific need, I knew I had to make a little program for that, and there came JAI for the rescue.