how I make to place colors in an image with 16 bits?
so far only I obtained with 256 colors.
Look my code:

col = (RGBColorType*)malloc(sizeof(RGBColorType) *
256);
// Set color palette to match BGR233 /
for (i = 0; i < 256; i++)
{
col[i].index = 0;
col[i].r = (((i >> 0) & 0x7) << 5) | (((i >> 0) & 0x7)
<< 2) | (((i >> 0) & 0x7) >> 1);
col[i].g = (((i >> 3) & 0x7) << 5) | (((i >> 3) & 0x7)
<< 2) | (((i >> 3) & 0x7) >> 1);
col[i].b = (((i >> 6) & 0x3) << 6) | (((i >> 6) & 0x3)
<< 4) | (((i >> 6) & 0x3) << 2) | ((i >> 6) & 0x3);
}
// allocate space for table /
e=WinPalette(winPaletteSet, 0,256, col);  
WinSetForeColorRGB(NULL,col); 
free(col);
                        
drawBitmap(10,myImage);



Please, help me!





 --- Ben Combee <[EMAIL PROTECTED]> escreveu: 
> 
> >how I make to draw images with 24 bits?
> 
> Palm OS doesn't currently support 24-bit depth
> color.  16-bit is the best 
> bit-depth that's supported right now.  When using
> 16-bit color, the pixel 
> values directly map to the color value, and you use
> WinSetForeColorRGB and 
> similar calls.
> 
> -- Ben Combee, DTS technical lead, PalmSource, Inc.
>     "Combee on Palm OS" weblog:
> http://palmos.combee.net/
>     Palm OS Dev Fourm Archives:
> http://news.palmos.com/read/all_forums/
> 
> 
> -- 
> For information on using the Palm Developer Forums,
> or to unsubscribe, please see
> http://www.palmos.com/dev/support/forums/
>  

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to