Bitmap::Bitmap (INT,INT,PixelFormat) 方法 (gdiplusheaders.h)

创建指定大小和像素格式的 Bitmap::Bitmap 对象。 必须在构造 Bitmap::Bitmap 对象后提供像素数据。

语法

void Bitmap(
  [in] INT         width,
  [in] INT         height,
  [in] PixelFormat format
);

parameters

[in] width

类型: INT

指定位图的宽度(以像素为单位)的整数。

[in] height

类型: INT

指定位图的高度(以像素为单位)的整数。

[in] format

类型: PixelFormat

可选。 指定位图的像素格式的整数。 表示各种像素格式的 PixelFormat 数据类型和常量在 Gdipluspixelformats.h 中定义。 有关像素格式常量的详细信息,请参阅 图像像素格式常量。 默认值为 PixelFormat32bppARGB。

返回值

要求

   
最低受支持的客户端 Windows XP、Windows 2000 Professional [仅限桌面应用]
最低受支持的服务器 Windows 2000 Server [仅限桌面应用]
目标平台 Windows
标头 gdiplusheaders.h (包括 Gdiplus.h)
Library Gdiplus.lib
DLL Gdiplus.dll

另请参阅

Bitmap

位图构造函数

图像

图像像素格式常量

图像、位图和图元文件

使用图像、位图和图元文件