Click here to Skip to main content
15,885,365 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to read Image's Pixel co-ordinates Pin
Naveen10-Sep-09 17:28
Naveen10-Sep-09 17:28 
GeneralRe: How to read Image's Pixel co-ordinates Pin
Game-point10-Sep-09 18:09
Game-point10-Sep-09 18:09 
GeneralRe: How to read Image's Pixel co-ordinates Pin
Naveen10-Sep-09 18:13
Naveen10-Sep-09 18:13 
GeneralRe: How to read Image's Pixel co-ordinates Pin
Game-point10-Sep-09 18:18
Game-point10-Sep-09 18:18 
GeneralRe: How to read Image's Pixel co-ordinates Pin
Naveen10-Sep-09 18:19
Naveen10-Sep-09 18:19 
GeneralRe: How to read Image's Pixel co-ordinates Pin
Game-point10-Sep-09 18:29
Game-point10-Sep-09 18:29 
GeneralRe: How to read Image's Pixel co-ordinates Pin
Naveen10-Sep-09 19:11
Naveen10-Sep-09 19:11 
GeneralRe: How to read Image's Pixel co-ordinates Pin
Game-point10-Sep-09 19:40
Game-point10-Sep-09 19:40 
Hi naveen

void CCBIView::OnDraw(CDC* pDC)
{
	CCBIDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	if (!pDoc)
		return;
	CImage image;
	CPen ps;
	//CClientDC dc(this);
	image.Load (_T("read.tif"));
	int w,h;
	w = image.GetWidth();
	h = image.GetHeight();
	int color;
	COLORREF clr;
	for(int i = 0 ; i < w ; i ++)
	for(int j = 0 ; j < h; j ++)
	{		
			color = image.GetPixel(i,j);
			clr=image.GetPixel(i,j);
			int Rvalue=GetRValue(clr);
			int Gvalue=GetGValue(clr);
			int Bvalue=GetBValue(clr);
			if(Rvalue == 0 && Gvalue == 0 && Bvalue == 0)
			{
				//ps.CreatePen(PS_SOLID,i,RGB(255,0,0));
				pDC ->SetPixel (i,j,color);
			}	
	//		img.SetPixel(i,j,clr);
	
	
	
	}
	// TODO: add draw code for native data here
}


now its ok but too slow ...

and how to make one vertical and horizontal line in the image ..

PLease.....

~~~~~~~~~~~~~Raju~~~~~~~~~~~~~


Questionwhat will happen when i terminate a process? Pin
iceman861610-Sep-09 14:25
iceman861610-Sep-09 14:25 
QuestionRe: what will happen when i terminate a process? Pin
Randor 10-Sep-09 15:04
professional Randor 10-Sep-09 15:04 
AnswerRe: what will happen when i terminate a process? Pin
Naveen10-Sep-09 17:23
Naveen10-Sep-09 17:23 
QuestionRe: what will happen when i terminate a process? Pin
Randor 10-Sep-09 17:33
professional Randor 10-Sep-09 17:33 
AnswerRe: what will happen when i terminate a process? Pin
Naveen10-Sep-09 17:40
Naveen10-Sep-09 17:40 
GeneralRe: what will happen when i terminate a process? Pin
Randor 10-Sep-09 17:46
professional Randor 10-Sep-09 17:46 
AnswerRe: what will happen when i terminate a process? Pin
Stuart Dootson10-Sep-09 20:32
professionalStuart Dootson10-Sep-09 20:32 
AnswerRe: what will happen when i terminate a process? Pin
kilt14-Sep-09 2:27
kilt14-Sep-09 2:27 
QuestionMatching function for the code Pin
Waldemar Ork10-Sep-09 9:21
Waldemar Ork10-Sep-09 9:21 
AnswerRe: Matching function for the code Pin
Selvam R10-Sep-09 9:40
professionalSelvam R10-Sep-09 9:40 
AnswerRe: Matching function for the code Pin
Maximilien10-Sep-09 9:43
Maximilien10-Sep-09 9:43 
AnswerRe: Matching function for the code Pin
Stuart Dootson10-Sep-09 11:08
professionalStuart Dootson10-Sep-09 11:08 
GeneralRe: Matching function for the code Pin
Waldemar Ork12-Sep-09 8:18
Waldemar Ork12-Sep-09 8:18 
Questionstd::wstring cannot convert from char[3] to class std::basic_string................. Pin
egerving10-Sep-09 8:25
egerving10-Sep-09 8:25 
AnswerRe: std::wstring cannot convert from char[3] to class std::basic_string................. Pin
Cedric Moonen10-Sep-09 8:34
Cedric Moonen10-Sep-09 8:34 
GeneralRe: std::wstring cannot convert from char[3] to class std::basic_string................. Pin
egerving10-Sep-09 8:53
egerving10-Sep-09 8:53 
GeneralRe: std::wstring cannot convert from char[3] to class std::basic_string................. Pin
Rajesh R Subramanian10-Sep-09 9:12
professionalRajesh R Subramanian10-Sep-09 9:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.