Connecting Tech Pros Worldwide Forums | Help | Site Map

Convert bitmap color depth

botched
Guest
 
Posts: n/a
#1: Aug 1 '08
How can I convert a bitmap's color depth from 32bits to 16bits?



Mark Salsbery [MVP]
Guest
 
Posts: n/a
#2: Aug 1 '08

re: Convert bitmap color depth


"botched" <botched@home.nowwrote in message
news:eeT3sd28IHA.1180@TK2MSFTNGP03.phx.gbl...
Quote:
How can I convert a bitmap's color depth from 32bits to 16bits?
What pixel formats? RGB? Grayscale? Palette indexes?

Mark

--
Mark Salsbery
Microsoft MVP - Visual C++
Quote:
>
>
Michael Phillips, Jr.
Guest
 
Posts: n/a
#3: Aug 1 '08

re: Convert bitmap color depth


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.


botched
Guest
 
Posts: n/a
#4: Aug 1 '08

re: Convert bitmap color depth


Thanks!

"Michael Phillips, Jr." <mphillips53@nospam.jun0.c0mwrote in message
news:eQErqK98IHA.3848@TK2MSFTNGP04.phx.gbl...
Quote:
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.
>

Closed Thread