At 12:51 AM +0100 23-03-00, Ben Gottlieb wrote:
>I can't seem to figure out how to *create* a bitmap with a Color
>Table 'built in'. Any ideas?
We don't do this. I'm not even sure how you'd go about it... I guess start
with a hex editor and Bitmap.h. (We tested the functionality by creating
these beasts with C source.)
It's probably not a good idea, by the way. If you create a bitmap with a
colortable built in, the OS will create a translation table that maps your
colortable to the current draw window color table, and then pass every
pixel in your bitmap through the translation table. Result: slow rendering.
Instead, you probably want to just reprogram the current palette, then draw
your bitmap (which does not have an embedded colortable) into the window.
The result is you'll see the right colors, at least to the extent that the
hardware can reproduce them, and drawing will be fast.
Slide show apps need to reprogram the palette to make the pictures look good.
You could certainly reprogram the palette with a colortable that's
extracted from a bitmap, and just use the bitmap-plus-colortable format as
a convenient 'container' for both objects... but you will pay a rendering
price for this convenience. (Namely, creating the translation table...
it's always created, even if the embedded colortable matches the draw
windows colortable.)
--Bob
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html