944,167 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 4890
  • C++ RSS
Feb 8th, 2005
0

conversion to binary image

Expand Post »
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..
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
kalaichris is offline Offline
1 posts
since Feb 2005
Jul 27th, 2006
0

Re: conversion to binary image

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.
Super Moderator
Featured Poster
Reputation Points: 3241
Solved Threads: 719
Failure as a human
~s.o.s~ is offline Offline
8,873 posts
since Jun 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
This thread is currently closed and is not accepting any new replies.
Previous Thread in C++ Forum Timeline: Beginning C++ program question
Next Thread in C++ Forum Timeline: Help with this code





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC