// ttest.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#pragma comment(lib,"gdi32")
#include <windows.h>
#include <stdio.h>
int main()
{
const DWORD uWidth = 1* 256, uHeight = 1 * 256;
PBITMAPINFO pbmi = (PBITMAPINFO) LocalAlloc (LPTR, sizeof (BITMAPINFOHEADER) + sizeof (RGBQUAD) * 2);
pbmi->bmiHeader.biSize = sizeof (BITMAPINFOHEADER);
pbmi->bmiHeader.biWidth = uWidth;
pbmi->bmiHeader.biHeight = uHeight;
pbmi->bmiHeader.biPlanes = 1;
pbmi->bmiHeader.biBitCount = 1;
pbmi->bmiHeader.biSizeImage = ((uWidth + 31) & ~31) / 8 * uHeight;
pbmi->bmiColors[0].rgbBlue = 0;
pbm
字符串保存为bmp
最新推荐文章于 2024-04-23 10:06:43 发布