Its caused by the way windows (has to) handle the index colors in your
bitmap.
A 256 color bitmap is a socalled indexed bitmap. Every colornumber
(0-255) refers to a table in which the real colors (in RGB) are
stored. So if you have a pixel with a 'colornumer' 1 it could be red,
green or whatever color.
Since windows also has to show its own text, titles, frames etcetera;
it saves some color number for its own use (about 20-30). This of
course means that your bitmap must now be remapped from 256 to the
remaning 230 (?) colornumbers.
It can't do this blindly though, since there might also be other
bitmaps, forms, etc that also use there own colors and you normally
would like to see these also. So it takes into account what is already
on the screen and remaps accordingly.
You can make it easier for windows to use a standard 'windows'
colormapping (most paint programs show these in the indexed color
options) or using less than the 256 colorindexes (say e.g. 150),
giving Windows some more space to work with.
(make sure that all your bitmaps use the same colorindex !)
>I have a 256 colour bitmap on a form and my screen display is set to 256
>colour.
>
>The image looks vert grainy when I start the form. If I close and reopen it
>very often the image appears OK but not always. Am I missing something?
Andy Trezise - 31 Jan 2004 12:10 GMT
Very interesting....Thanks
> Its caused by the way windows (has to) handle the index colors in your
> bitmap.
[quoted text clipped - 22 lines]
> >The image looks vert grainy when I start the form. If I close and reopen it
> >very often the image appears OK but not always. Am I missing something?