Convert bitmap color depth

  • Thread starter Thread starter botched
  • Start date Start date
botched said:
How can I convert a bitmap's color depth from 32bits to 16bits?

What pixel formats? RGB? Grayscale? Palette indexes?

Mark
[/QUOTE]
 
How can I convert a bitmap's color depth from 32bits to 16bits?

If you do not wish to convert to 16bpp grayscale, then create an empty 16bpp
DIB with CreateDIBSection and use BitBlt to do the color conversion.

If you do wish to convert to 16bpp grayscale, then use Microsoft's Windows
Imaging Component API as there is no support for 16bpp grayscale with
Microsoft's gdiplus or GDI API's.
 
Thanks!

Michael Phillips said:
If you do not wish to convert to 16bpp grayscale, then create an empty
16bpp DIB with CreateDIBSection and use BitBlt to do the color conversion.

If you do wish to convert to 16bpp grayscale, then use Microsoft's Windows
Imaging Component API as there is no support for 16bpp grayscale with
Microsoft's gdiplus or GDI API's.
 
Back
Top