nanogui: Thread: Transparency in jpegs????


[<<] [<] Page 1 of 1 [>] [>>]
Subject: Transparency in jpegs????
From: tj ####@####.####
Date: 2 Mar 2006 19:54:07 +0000
Message-Id: <44074D96.2030500@comcast.net>

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.

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?

Can this structure be accessed from app code? the image ID is simply an 
integer ID.

tj

Subject: Re: [nanogui] Transparency in jpegs????
From: "Greg Haerr" ####@####.####
Date: 3 Mar 2006 02:59:58 +0000
Message-Id: <01e101c63e6e$6cfad3a0$6401a8c0@winXP>

: 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.

Regards,

Greg
[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.