⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bitmap.cpp

📁 用FPGA来实现摄像头的捕捉和采集
💻 CPP
字号:
/****************************************************************
  
	CST 238 GUI Project.
	Windows interface to digital camera senior project.
		
    Filename:  	Bitmap.cpp
	Compiler:	MSVC 6.0
	Author:		Ryan Henderson

****************************************************************/

#include "Bitmap.h"


// Create a big block of memory for the bitmap and then
// assign pointers to the correct spots within it

Bitmap::Bitmap(LONG width, LONG Height)
{
	nSize = sizeof(BITMAPFILEHEADER) +
						sizeof(BITMAPINFOHEADER) +
						width * Height * sizeof(DWORD);

	lpBitmap = (LPBYTE) LocalAlloc(LPTR, nSize);
	phdr = (PBITMAPFILEHEADER) lpBitmap;
	pbih = (PBITMAPINFOHEADER) (lpBitmap + sizeof(BITMAPFILEHEADER));
	lpPixels = (LPDWORD) (lpBitmap + sizeof(BITMAPFILEHEADER) +
		sizeof(BITMAPINFOHEADER)); 

}

Bitmap::~Bitmap()
{
	if (lpBitmap != NULL) GlobalFree((HGLOBAL)lpBitmap);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -