nanogui: Transparency in jpegs????
Re: [nanogui] Transparency in jpegs????
"Greg Haerr" ####@####.####
3 Mar 2006 02:59:58 +0000
: I have a strange problem, I am getting transparency when loading a jpeg
: image when using GrLoadImageFromFile(). Now the first thing you might
: say is jpegs don't support transparency. But, it is happening. The white
: GR_RGB(255,255,255) pixels are transparent.
This is a known bug and is fixed in CVS.
: Now I do load some gif images that are using white, they're background
: color, as transparent. Could it be that for some reason when the jpeg is
: getting loaded the transcolor member of GR_IMAGE_HDR is getting set to
: the previouisly loaded gif's white transparency color instead of a being
: set to a -1?
The bug appeared when a contribution was added for alpha
channel support. With alpha channel of 255 (default), white
appears as ARGB(255,255,255,255) which is -1, which
matches the transparent color set in the image struct, so it
wasn't displayed. The code was rewritten as a fix in CVS.