I have made an application where in i have to load a btimap and on button event i have to change color depth of the bitmap, I have successfully made the changes for RGB, by manipulating the RGBQUAD of the bitmap. But i am stuck at this point where i want to convert the loaded color bitmap into monochrome on click of button ? How can this be done ? Can this be also done by manipulation of the RGBQUAD of the bitmap or in some other way. If with RGBQUAD what will be the COLOR VALUE of RGB in case of monochrome. Please also note that i am able to load the color image and then convert it to monochrome. Please take a note that this is a SDI MFC application. Thanks in advance.
Asked
Active
Viewed 268 times
-1
-
1For converting RGB values into grayscale values, please have a look at this excellent wikipedia article: http://en.wikipedia.org/wiki/Grayscale – Jabberwocky Sep 24 '13 at 10:08
1 Answers
0
Maybe AfxDrawGrayBitmap is what you want.

rrirower
- 4,338
- 4
- 27
- 45
-
I am using Visual studio 6.0 and in that the afxwin.h does not have AfxDrawGrayBitmap() function any substitue ? – xMayank Sep 25 '13 at 07:55
-
Sorry. I'm not aware of a substitute for that function in VS6. You'll need to craft your own, or, update your Visual Studio. – rrirower Sep 25 '13 at 12:34
-
Ask somebody you now with a new VS. He might send you the source. It AFAIK is less then 30 lines. – xMRi Sep 27 '13 at 07:51