Hi
my code:
UInt32 r, g, b;
UInt16 rgb565;
UInt8 *srcBitsP;
RGBColorType* teste;
PalmBitmapType* srcBitmapP;
MemHandle hRsc =
DmGetResource(bitmapRsc,ImgIndexFigure);//
BitmapType* bitmapP = (BitmapType*)
MemHandleLock(hRsc);
UInt32 x=16; //x coordinate of pixel
UInt32 y=16; //y coordinate of pixel
//===============================================================
// Get pointer to where pixel comes from
//===============================================================
srcBitmapP->rowBytes=(UInt16)BmpGetBits(bitmapP);
srcBitmapP->pixelSize=(UInt16)BmpGetBitDepth(bitmapP);
srcBitsP += (srcBitmapP->rowBytes * y);
srcBitsP += (x * srcBitmapP->pixelSize) / 8;
rgb565 = ((srcBitsP[0]) << 8) | (srcBitsP[1]);
r = ((rgb565 & 0xF800) >> 8) // 5 bits of red
| ((rgb565 & 0x3800) >> 11);
g = ((rgb565 & 0x07E0) >> 3) // 6 bits of green
| ((rgb565 & 0x0060) >> 5);
b = ((rgb565 & 0x001F) << 3) // 5 bits of blue
| ((rgb565 & 0x0007));
*outRGB = (r << 16) | (g << 8) | (b);
teste=(RGBColorType*)outRGB;
WinSetForeColorRGB(NULL,teste);
but don't function.
--- Marilia Mendes <[EMAIL PROTECTED]>
escreveu:
> please, somebody could give an example
> or something that can help me on as to place 16 bits
> in one bitmap?
> because I only know to place 256 colors, using
> pallete
> of colors, but with depht=16 does not use
> WinPallete.
> How I make?
>
> Thanks
>
>
>
>
>
>
>
_______________________________________________________
> Yahoo! Messenger 6.0 - jogos, emoticons sonoros e
> muita divers�o. Instale agora!
> http://br.download.yahoo.com/messenger/
>
> --
> For information on using the Palm Developer Forums,
> or to unsubscribe, please see
> http://www.palmos.com/dev/support/forums/
>
_______________________________________________________
Yahoo! Messenger 6.0 - jogos, emoticons sonoros e muita divers�o. Instale agora!
http://br.download.yahoo.com/messenger/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/