Convert bitmap color depth

M

Mark Salsbery [MVP]

botched said:
How can I convert a bitmap's color depth from 32bits to 16bits?

What pixel formats? RGB? Grayscale? Palette indexes?

Mark
[/QUOTE]
 
M

Michael Phillips, Jr.

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.
 
B

botched

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top