Bug 217 : when loading gif images, you don't break on finding transparency
Last modified: 2005-11-22 08:14




Status:
RESOLVED
Resolution:
FIXED -
Priority:
P4
Severity:
normal

 

Reporter:
jedierikb
Assigned To:
fry

Attachment Type Created Size Actions

Description:   Opened: 2005-11-21 19:20
version 95

in PApplet, in the loadImage method, you don't break out of your loop when
you find a transparent pixel.

here is the code:
// if it's a .gif image, test to see if it has transparency
if (filename.toLowerCase().endsWith(".gif")) {
for (int i = 0; i < image.pixels.length; i++) {
// since transparency is often at corners, hopefully this
// will find a non-transparent pixel quickly and exit
if ((image.pixels[i] & 0xff000000) != 0xff000000) {
image.format = ARGB;
}
}
}
return image;
}
Additional Comment #1 From fry 2005-11-22 08:14
whups, fixed for 0096.