954,499 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

conversion to binary image

im not a pro in c++, so hope you pros out there can help me out.

I can convert a bmp to grayscale but dont no how to convert it to a binary image..i mean i dont no which functions to use..all helps are greatly appreciated..thank you..this is my structure...

HBITMAP hBitmap = (HBITMAP) ::LoadImage(AfxGetInstanceHandle(), m_sBitmap, IMAGE_BITMAP, 100,140, LR_LOADFROMFILE | LR_CREATEDIBSECTION);

HBITMAP hGrayBitmap = (HBITMAP) ::LoadImage(AfxGetInstanceHandle(), m_sBitmap, IMAGE_BITMAP, 100,140, LR_LOADFROMFILE | LR_CREATEDIBSECTION);

BITMAP bm;

GetObject(hGrayBitmap, sizeof(BITMAP), (LPSTR)&bm);

typedef struct tagBITMAP
{
LONG bmType;
LONG bmWidth;
LONG bmHeight;
LONG bmWidthBytes;
WORD bmPlanes;
WORD bmBitsPixel;
LPVOID bmBits;
}
BITMAP, *PBITMAP;

if u guys need 2 see the conversion to grayscale pls do inform me..i thank all opinions and greatly appreciate you helps thank you..

kalaichris
Newbie Poster
1 post since Feb 2005
Reputation Points: 10
Solved Threads: 0
 

Man dont u ever give up, i think this is the second time u are replying to a dead post. Please dont make this forum a graveyard and follow the forum guidelines before posting.

~s.o.s~
Failure as a human
Administrator
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You