bitmapInfoHeader.biSize = sizeof(BITMAPINFOHEADER);
bitmapInfoHeader.biWidth = strBitmap.bmWidth;
bitmapInfoHeader.biHeight = strBitmap.bmHeight;
bitmapInfoHeader.biPlanes = 1;
bitmapInfoHeader.biBitCount = wBitCount;
bitmapInfoHeader.biClrImportant = BI_RGB;
bitmapInfoHeader.biSizeImage = 0; //strBitmap.bmWidth * strBitmap.bmHeight;
bitmapInfoHeader.biXPelsPerMeter = 0;
bitmapInfoHeader.biYPelsPerMeter = 0;
bitmapInfoHeader.biClrUsed = 0;
bitmapInfoHeader.biClrImportant = 0; 之前为什么必须用
memset(&bitmapInfoHeader, 0, sizeof(BITMAPINFOHEADER));
把结构清空, 我不是已经给每项赋值了吗?
bitmapInfoHeader.biWidth = strBitmap.bmWidth;
bitmapInfoHeader.biHeight = strBitmap.bmHeight;
bitmapInfoHeader.biPlanes = 1;
bitmapInfoHeader.biBitCount = wBitCount;
bitmapInfoHeader.biClrImportant = BI_RGB;
bitmapInfoHeader.biSizeImage = 0; //strBitmap.bmWidth * strBitmap.bmHeight;
bitmapInfoHeader.biXPelsPerMeter = 0;
bitmapInfoHeader.biYPelsPerMeter = 0;
bitmapInfoHeader.biClrUsed = 0;
bitmapInfoHeader.biClrImportant = 0; 之前为什么必须用
memset(&bitmapInfoHeader, 0, sizeof(BITMAPINFOHEADER));
把结构清空, 我不是已经给每项赋值了吗?
DWORD biSize;
LONG biWidth;
LONG biHeight;
WORD biPlanes;
WORD biBitCount;
DWORD biCompression; // 这个没有
DWORD biSizeImage;
LONG biXPelsPerMeter;
LONG biYPelsPerMeter;
DWORD biClrUsed;
DWORD biClrImportant;
} BITMAPINFOHEADER, FAR *LPBITMAPINFOHEADER, *PBITMAPINFOHEADER;