Click here to Skip to main content
15,923,689 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: visual c++ change button code Pin
toxcct11-May-06 5:00
toxcct11-May-06 5:00 
GeneralRe: visual c++ change button code Pin
Hamid_RT11-May-06 5:11
Hamid_RT11-May-06 5:11 
GeneralRe: visual c++ change button code Pin
toxcct11-May-06 5:14
toxcct11-May-06 5:14 
GeneralRe: visual c++ change button code Pin
Hamid_RT11-May-06 5:36
Hamid_RT11-May-06 5:36 
AnswerRe: visual c++ change button code Pin
Cedric Moonen11-May-06 5:00
Cedric Moonen11-May-06 5:00 
GeneralRe: visual c++ change button code Pin
toxcct11-May-06 22:56
toxcct11-May-06 22:56 
GeneralRe: visual c++ change button code Pin
Cedric Moonen11-May-06 22:59
Cedric Moonen11-May-06 22:59 
QuestionDisplay Grayscale Image from a Firewire Camera Pin
surfman1911-May-06 4:19
surfman1911-May-06 4:19 
Hi,

i get a 32 bit RGBA Image from my firewire camera...and i want to display a gray scale image to a Picture Control with MFC!

convert function:
<br />
void CImageProcView::RGBA2Gray(char *Img1, char *Img2, unsigned int ByteSize)<br />
{<br />
	for(int i = 0; i<ByteSize/4; i++)<br />
	{<br />
		Img2[i]=((signed char)Img1[4*i]+(signed char)Img1[4*i+1]+(signed char)Img1[4*i+2])/3;<br />
	}<br />
}<br />


<br />
char *CurrentImage;<br />
char *GrayMap;<br />
CStatic	m_Img1;<br />
CBitmap Bitmap1;<br />
memcpy(Current,FireCapture->FlippedBuffer,FireCapture->grabBufferSize);<br />
<br />
RGBA2Gray(CurrentImage, GrayMap, FireCapture->grabBufferSize); // FireCapture->grabBufferSize = 307200<br />
<br />
// FireCapture->pVih->bmiHeader.biWidth = 320<br />
// FireCapture->pVih->bmiHeader.biHeight = 240<br />
// FireCapture->iBitDepth = 32 ... i get a 32 bit RGBA from the firewire camera!<br />
Bitmap1.CreateBitmap(FireCapture->pVih->bmiHeader.biWidth, FireCapture->pVih->bmiHeader.biHeight, 1, 8, GrayMap);<br />
<br />
m_Img1.SetBitmap(Bitmap1);<br />


somthing dont work with this CStatic Picture Control;/ any idea? i think the CreateBitmap dont take the cBitsPerPel;/

bye
AnswerRe: Display Grayscale Image from a Firewire Camera Pin
Russell'11-May-06 5:00
Russell'11-May-06 5:00 
GeneralRe: Display Grayscale Image from a Firewire Camera Pin
surfman1911-May-06 7:49
surfman1911-May-06 7:49 
GeneralRe: Display Grayscale Image from a Firewire Camera Pin
Justin Tay11-May-06 15:18
Justin Tay11-May-06 15:18 
GeneralRe: Display Grayscale Image from a Firewire Camera Pin
surfman1912-May-06 0:25
surfman1912-May-06 0:25 
GeneralRe: Display Grayscale Image from a Firewire Camera Pin
Justin Tay12-May-06 0:37
Justin Tay12-May-06 0:37 
GeneralRe: Display Grayscale Image from a Firewire Camera Pin
surfman1912-May-06 3:09
surfman1912-May-06 3:09 
QuestionCCombobox drawitem question Pin
Tarek Jabri11-May-06 4:17
Tarek Jabri11-May-06 4:17 
AnswerRe: CCombobox drawitem question Pin
Hamid_RT11-May-06 4:49
Hamid_RT11-May-06 4:49 
GeneralRe: CCombobox drawitem question Pin
Tarek Jabri11-May-06 6:02
Tarek Jabri11-May-06 6:02 
GeneralRe: CCombobox drawitem question Pin
Hamid_RT11-May-06 6:49
Hamid_RT11-May-06 6:49 
GeneralRe: CCombobox drawitem question Pin
Hamid_RT11-May-06 7:23
Hamid_RT11-May-06 7:23 
QuestionUDP/ TCP socket problem Pin
nahitan11-May-06 3:47
nahitan11-May-06 3:47 
AnswerRe: UDP/ TCP socket problem Pin
kk.tvm11-May-06 22:24
kk.tvm11-May-06 22:24 
Questionneeding help in algorithm Pin
V_shr11-May-06 3:46
V_shr11-May-06 3:46 
AnswerRe: needing help in algorithm Pin
toxcct11-May-06 3:51
toxcct11-May-06 3:51 
GeneralRe: needing help in algorithm Pin
V_shr11-May-06 3:57
V_shr11-May-06 3:57 
GeneralRe: needing help in algorithm Pin
toxcct11-May-06 4:03
toxcct11-May-06 4:03 

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.