Hi Zane!
RZR> Finally doing some graphics in 16-bit color, and I'm curious about
RZR> direct color. I'm supposed to pass a direct color RGB565 value to
RZR> BmpSetTransparentValue(), where that transparent value is defined
RZR> (according to the manual) as UInt32.
RZR> First of all, shouldn't that passed value be only 16 bits? What's up
RZR> with 32?
In my app, I have used pure wite transparent color, and I set it 0xFFFF
BmpSetTransparentValue((BitmapType*)m_BmpV3, 0xFFFF);
RZR> And secondly (most importantly), what's the best/simplest way
RZR> to finesse the needed red/green/blue values into the 565 form in C
RZR> code?
I am using encoding to 5-6-6:
//make 5-6-5 bitmap coding (16bit)
//UInt8 R,G,B
R = (R-7) / 8;
G = (G-3) / 4;
B = (B-7) / 8;
//put all colors to one value
UInt16 color = (R<<11) | (G<<5) | B;
--
Damir mailto:[EMAIL PROTECTED]
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/