Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] Images with a 8 bit palette

Hi!

I've got a question concerning palettes and color masks for an 8 bit palette.
<snip>
palette = new PaletteData(0xFF,0xFF00,0xFF0000);
imgData = new ImageData(xImageSize, yImageSize, 24, palette);
</snip>

The code above  would be fine for a 24 bit image.
But how do I create a color mask for an 8 bit image?
As 24/3=8, 8 bits can be used for each color. What about 8/3?? ;-)

Cheers,
 Daniel



Back to the top