Thursday, 6 March 2008

processing and tga's

You can always depend on a tga. That faithful image format is like an old friend. But processing has a bug where is saves them out upside down. You can see the bug in this code

line(10,10,90,90);
save("data/img.tga");
PImage img = loadImage("img.tga");
img.save("data/img2.tga");
exit();

Until a fix gets in, here is a workaround

line(10,10,90,90);
save("data/img.tga");
PImage img = loadImage("img.tga");
PImage outImg = createImage(img.width, img.height, ARGB);
for(int x = 0; x < y =" 0;">

UPDATE:

It's fixed for 0136. WooT

Labels: , , , , , ,