Actually the drawn V3 bitmap, with the colortable, can be changed to a V1 or V2 and the problem still persists.
The program also supports Clie OS4 Highres support and also uses an offscreen window using HRWinCreateBitmapWindow, but using the Clie calls the colortable is converted correctly when drawn to the screen.
I've so far had to use WinPalette, which works, but is far from ideal due to there being a number of different bitmaps being drawn. These bitmaps are all 16 colors but have different palettes.
It's a bit difficult to show code as there is so much involved here.
ColorTableType *ctbl = MemPtrNew(sizeof (ColorTableType) + (256 * sizeof (RGBColorType)));
RGBColorType *newpal = ColorTableEntries (ctbl);
/*setup palette*/
drawBitmap = BmpCreate(gimage.width, gimage.height, 8, ctbl, &err);
drawBitmapV3 = BmpCreateBitmapV3(drawBitmap, kDensityLow,
BmpGetBits(drawBitmap), NULL);
/* Bitmap then painted to offscreen window using WinPaintBitmap, then offscreen copied to screen using WinCopyRectangle*/
Doing a BmpGetColortable returns a valid looking colortable on the V3.
The offscreen window is created as follows:
gprOffScreenBitmap = BmpCreate(x, y, HW_Screen_Depth(), NULL, &err);
gprOffScreenBitmapV3 = BmpCreateBitmapV3(gprOffScreenBitmap,
kDensityLow, BmpGetBits(gprOffScreenBitmap),NULL);
backscreenHandle = WinCreateBitmapWindow((BitmapType*)gprOffScreenBitmapV3,&err);
Help Fangorn.
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
