Board index » delphi » 4-bit Bitmaps

4-bit Bitmaps

Hello and Help,

I need to save a bitmap from my Delphi app. in 4-bit mode. How do I do this
as the 24-bit BMP being produced can't be used by my client.

Cheers,

Adrian

 

Re:4-bit Bitmaps


Quote
Mike McPherson wrote in message <7c2qoa$r0...@plug.news.pipex.net>...
>I need to save a bitmap from my Delphi app. in 4-bit mode. How do I do this
>as the 24-bit BMP being produced can't be used by my client.

Without knowing more about what you're doing, I'm not sure how to give you a single answer, but here are a few things to think
about:

When you create the bitmap, have you tried just setting the PixelFormat to pf4bit?

When you create a pf24bit bitmap you don't need to worry about palettes.  But with pf4bit bitmaps, you must be concerned with
palettes.

The "pixel" for each scanline in a pf4bit bit map is a 4-bit value, i.e., 0..15, which is an index into the palette.

You might take a look at the "Combine pf4bit Bitmap" Lab Report for an example of working with pf4bit bitmaps:
www.efg2.com/lab/graphics/colors/CombinePf4bit.htm

efg
_________________________________
efg's Computer Lab:       www.efg2.com/lab
Delphi Books:  www.efg2.com/lab/TechBooks/Delphi.htm

Earl F. Glynn     E-Mail:  EarlGl...@att.net
Overland Park, KS  USA

Other Threads