class WJImage
{
public:
void copyRect (WJImage* pImage, CRect rcArea) ; //##ModelId=3CDC800A02C2
void onEqualization();
//##ModelId=3CDC800A02CC
void onGray();
//##ModelId=3CDC800A02D6
void getPixel(int x, int y, short rgb[3]);
//##ModelId=3CDC800A02EA
void saveBMP (CString fileName);
//##ModelId=3CDC800A02F4
bool init (int bitCount, CSize size);
//##ModelId=3CDC800A0308
void* getImageBuffer();
//##ModelId=3CDC800A0309
WJImage(); //allocate memory
//##ModelId=3CDC800A0312
WJImage(int bitCount, CSize size);
//release memeory
//##ModelId=3CDC800A031D
~WJImage();
//##ModelId=3CDC800A0326
CSize m_Size; // size of the video frame : widthxheight
//##ModelId=3CDC800A0330
int m_iBitCount; // Bit Depth of the color image,
// 24 bits: 3 bytes for RGB image
// 8 bits: 1 byte for gray image
//##ModelId=3CDC800A033A
long m_lBufferSize; // Buffer size for single frame image, it should be
// lBufferSize = Width * Height * BitCounts/8 ; for RGB color image //##ModelId=3CDC800A034E
void* m_pImageBuffer;};利用WJImage* image = m_WJVideo.GetGrabImage();得到每帧信息,请问怎样才能存到指定的文件夹中呢?谢谢大家了!!
void* m_pImageBuffer;buffer里面的数据是以什么格式存储的呢
[email protected]
dwDirAttr = GetFileAttributes(strFileName); //获得指定路径的属性
if (dwDirAttr == FILE_ATTRIBUTE_DIRECTORY)
{
......//是文件夹,创建文件
}
else
{
CreateDirectory(strFileName, NULL)//创建文件夹
}保存格式就得看LZ需要了,如果不是BMP就还需要编码.