TBitmap data changes when palette changes!

TBitmap data changes when palette changes!

Post by Athos Antonel » Thu, 06 May 1999 04:00:00



Hi,
I use a 8bit format DIB TBitmap and set a 256 color palette.
I store data in the bitmap using the vector returned from ScanLine().
My data are levels of gray.

When I change the palette, the data stored is changed by TBitmap
automatically, but I need to have back the original levels.

The new palette is a 16 level of gray spanned over 256 color index. It
seems that TBitmap translate our data in 16 index.

How we can leave unchanged our bitmap changing the associated palette?
I have to create a dib HBITMAP and use all the API of windows instead
of TBitmap?

Thanks.
-
Athos Antonelli

 
 
 

1. TBitmap data changes when palette changes!

Hi,
I use a 8bit format DIB TBitmap and set a 256 color palette.
I store data in the bitmap using the vector returned from ScanLine().
My data are levels of gray.

When I change the palette, the data stored is changed by TBitmap
automatically, but I need to have back the original levels.

The new palette is a 16 level of gray spanned over 256 color index. It
seems that TBitmap translate our data in 16 index.

How we can leave unchanged our bitmap changing the associated palette?

Thanks.
-
Athos Antonelli

2. Production Help Needed

3. Change palette of TBitmap

4. Slide of Screen

5. Can't change the background colour of a Tbitmap palette

6. s

7. Change image colors by changing 256 col palette

8. Maya2 release date??

9. Change the DPI of TBitmap

10. Changing the color table of a TBitmap...

11. How to change gamma in TBitmap (pf8bit)?

12. Changing TBitmap Color in a fast way

13. Changing TBitmap