Home > Software engineering >  How to get in VC6 streaming into images
How to get in VC6 streaming into images

Time:10-02

On VS use CImage can do before, because want to migrate to a VC6 development environment, on the application of so use VC6, found that no CImage VC6 support libraries, consult how to do? Do camera development, with the Canon of edsdk,

CodePudding user response:

refer to the original poster qq_16720259 response:
on VS use CImage can do before, because want to migrate to a VC6 development environment of the program, so use VC6, found that no CImage VC6 support libraries, consult how to do? Do camera development, with the Canon of edsdk,


The use of OpenCV library

CodePudding user response:

Cimage is atl garage, this part of the library in the vs, alone on the vc6 try, if it doesn't have to use bitmap to process images, don't know what you do is to use cimage ~

CodePudding user response:

Open the camera, and then get video streaming, save a file.

CodePudding user response:

Cimage using GDI +,

CodePudding user response:

refer to the second floor lx624909677 response:
cimage is atl garage, this part of the library in the vs, alone on the vc6 try, if it doesn't have to use bitmap to process images, don't know what you do is to use cimage ~

Consult the data stream into a bitmap should do? Can you give a code sample,

CodePudding user response:

6.0 you can also use CImage
https://zhidao.baidu.com/question/90869560.html

CodePudding user response:

reference 5 floor qq_16720259 reply:
Quote: refer to the second floor lx624909677 response:

Cimage is atl garage, this part of the library in the vs, alone on the vc6 try, if it doesn't have to use bitmap to process images, don't know what you do is to use cimage ~

Consult the data stream into a bitmap should do? Can you give a code example,

Data stream is a data are loaded by the binary stream
?
 FILE * fp=NULL; 
Int ret=fopen_s (& amp; Fp, "D: \ \ 11. BMP," "rb");
If (fp==0)
{
return ;
}
BITMAPFILEHEADER fileheader={0};
Fread (& amp; Fileheader, sizeof (fileheader), 1, fp);
If (fileheader bfType!=0 x4d42)
{
The fclose (fp);
return ;
}

BITMAPINFOHEADER head;
Fread (& amp; The head, sizeof (BITMAPINFOHEADER), 1, fp);
Long bmpWidth=head. BiWidth;
Long bmpHeight=head. BiHeight;
WORD biBitCount=head. BiBitCount;
If (biBitCount!=24)
{
: : AfxMessageBox (_T (" please choose 24 bitmap!" ));
The fclose (fp);
return ;
}

Int totalSize=(bmpWidth * biBitCount/8 + 3)/4 * 4 * bmpHeight;
BYTE * pBmpBuf=new BYTE [totalSize];
Size_t size=0;
While (true)
{
Int iret=fread (& amp; PBmpBuf [size], 1, 1, fp);
If (iret==0)
break;
Size=size + iret;
}
The fclose (fp);

Int I, j;
CClientDC dc (this);
Int pitch=bmpWidth % 4;
for(i=0; i{
Int realPitch=I * pitch;
for(j=0; J{
Dc. SetPixel (j, I, RGB (
PBmpBuf [bmpWidth + j) (I * * 3 + 2 + realPitch],
PBmpBuf [bmpWidth + j) (I * * 3 + 1 + realPitch],
PBmpBuf [bmpWidth + j) (I * * 3 + realPitch]));
}
}
The delete [] pBmpBuf; PBmpBuf=NULL;
return ;

CodePudding user response:

refer to 7th floor lx624909677 response:
Quote: refer to fifth floor qq_16720259 response:

Quote: refer to the second floor lx624909677 response:

Cimage is atl garage, this part of the library in the vs, alone on the vc6 try, if it doesn't have to use bitmap to process images, don't know what you do is to use cimage ~

Consult the data stream into a bitmap should do? Can you give a code example,

Data stream is a data are loaded by the binary stream
?
 FILE * fp=NULL; 
Int ret=fopen_s (& amp; Fp, "D: \ \ 11. BMP," "rb");
If (fp==0)
{
return ;
}
BITMAPFILEHEADER fileheader={0};
Fread (& amp; Fileheader, sizeof (fileheader), 1, fp);
If (fileheader bfType!=0 x4d42)
{
The fclose (fp);
return ;
}

BITMAPINFOHEADER head;
Fread (& amp; The head, sizeof (BITMAPINFOHEADER), 1, fp);
Long bmpWidth=head. BiWidth;
Long bmpHeight=head. BiHeight;
WORD biBitCount=head. BiBitCount;
If (biBitCount!=24)
{
: : AfxMessageBox (_T (" please choose 24 bitmap!" ));
The fclose (fp);
return ;
}

Int totalSize=(bmpWidth * biBitCount/8 + 3)/4 * 4 * bmpHeight;
BYTE * pBmpBuf=new BYTE [totalSize];
Size_t size=0;
While (true)
{
Int iret=fread (& amp; PBmpBuf [size], 1, 1, fp);
If (iret==0)
break;
Size=size + iret;
}
The fclose (fp);

Int I, j;
CClientDC dc (this);
Int pitch=bmpWidth % 4;
for(i=0; i{
Int realPitch=I * pitch;
for(j=0; J{
Dc. SetPixel (j, I, RGB (
PBmpBuf [bmpWidth + j) (I * * 3 + 2 + realPitch],
PBmpBuf [bmpWidth + j) (I * * 3 + 1 + realPitch],
PBmpBuf [bmpWidth + j) (I * * 3 + realPitch]));
}
}
The delete [] pBmpBuf; PBmpBuf=NULL;
return ;


discovered digital camera to collect data stream is a JPEG format, depressed

CodePudding user response:

refer to the eighth floor qq_16720259 response:
Quote: refer to 7th floor lx624909677 response:

Quote: refer to the fifth floor qq_16720259 reply:

Quote: refer to the second floor lx624909677 response:

nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related