Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » ImageData alpha/transparency
ImageData alpha/transparency [message #442295] Tue, 31 August 2004 18:34 Go to next message
Knut Radloff is currently offline Knut RadloffFriend
Messages: 7
Registered: July 2009
Junior Member
When does SWT support alpha data in images, specifically in ImageData? Nothing seems to prevent me from creating indexed 4 bit
ImageData and supplying alpha data. Will this actually do something useful when I render the image? It seems like alpha only makes
sense with direct color images. I'm assuming that I can specify alpha in addition to 16 and 24 bit pixel data. Otherwise, with 32bpp
images, I would just supply the alpha directly in the pixel data.
Also, the spec doesn't say what the relationship is between the transparentPixel field and the alpha fields. Looking at
ImageData.getTransparencyType() and at the Image.init implementation it seems that the transparent pixel takes precedence over alpha
data?

Thanks,
Knut
Re: ImageData alpha/transparency [message #442532 is a reply to message #442295] Tue, 07 September 2004 17:28 Go to previous message
Silenio Quarti is currently offline Silenio QuartiFriend
Messages: 31
Registered: July 2009
Member
The alpha data can be supplied with any depth in SWT and it should work
everywhere. I believe this was a requirement to be able to implement AWT
using SWT. ImageDatas with depth of 32 are not treated as having alpha
transparency right now (this might change in the future).

The transparentPixel takes precedence over alpha transparency. If both are
set only the transparentPixel is used.

Silenio

Knut Radloff wrote:

> When does SWT support alpha data in images, specifically in ImageData?
Nothing seems to prevent me from creating indexed 4 bit
> ImageData and supplying alpha data. Will this actually do something useful
when I render the image? It seems like alpha only makes
> sense with direct color images. I'm assuming that I can specify alpha in
addition to 16 and 24 bit pixel data. Otherwise, with 32bpp
> images, I would just supply the alpha directly in the pixel data.
> Also, the spec doesn't say what the relationship is between the
transparentPixel field and the alpha fields. Looking at
> ImageData.getTransparencyType() and at the Image.init implementation it
seems that the transparent pixel takes precedence over alpha
> data?

> Thanks,
> Knut
Previous Topic:Memory leaks
Next Topic:How to drag Image from SWT App to OS?
Goto Forum:
  


Current Time: Fri Apr 26 10:10:01 GMT 2024

Powered by FUDForum. Page generated in 0.02948 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top