conversion to binary image

Please support our C++ advertiser: Intel Parallel Studio Home
Closed Thread

Join Date: Feb 2005
Posts: 1
Reputation: kalaichris is an unknown quantity at this point 
Solved Threads: 0
kalaichris kalaichris is offline Offline
Newbie Poster

conversion to binary image

 
0
  #1
Feb 8th, 2005
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..
Quick reply to this message  
Join Date: Jun 2006
Posts: 7,626
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 468
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: conversion to binary image

 
0
  #2
Jul 27th, 2006
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.
I don't accept change; I don't deserve to live.
Quick reply to this message  
Closed Thread

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC