牛骨文教育服务平台(让学习变的简单)
博文笔记

C#中的bitmap类的使用方法

创建时间:2012-07-13 投稿人: 浏览次数:33311

封装 GDI+ 位图,此位图由图形图像及其特性的像素数据组成。 Bitmap 是用于处理由像素数据定义的图像的对象。

继承层次结构
System.Object 
  System.MarshalByRefObject
    System.Drawing.Image
      System.Drawing.Bitmap

命名空间:  System.Drawing

程序集:  System.Drawing(在 System.Drawing.dll 中)



C#语法

[SerializableAttribute]
[ComVisibleAttribute(true)]
public sealed class Bitmap : Image
Bitmap 类型公开以下成员。

  名称 说明
公共方法 Bitmap(Image) 从指定的现有图像初始化 Bitmap 类的新实例。
公共方法 Bitmap(Stream) 从指定的数据流初始化 Bitmap 类的新实例。
公共方法 Bitmap(String) 从指定的文件初始化 Bitmap 类的新实例。
公共方法 Bitmap(Image, Size) 从指定的现有图像(缩放到指定大小)初始化 Bitmap 类的新实例。
公共方法 Bitmap(Int32, Int32) 用指定的大小初始化 Bitmap 类的新实例。
公共方法 Bitmap(Stream, Boolean) 从指定的数据流初始化 Bitmap 类的新实例。
公共方法 Bitmap(String, Boolean) 从指定的文件初始化 Bitmap 类的新实例。
公共方法 Bitmap(Type, String) 从指定的资源初始化 Bitmap 类的新实例。
公共方法 Bitmap(Image, Int32, Int32) 从指定的现有图像(缩放到指定大小)初始化 Bitmap 类的新实例。
公共方法 Bitmap(Int32, Int32, Graphics) 用指定的大小和指定的 Graphics 对象的分辨率初始化 Bitmap 类的新实例。
公共方法 Bitmap(Int32, Int32, PixelFormat) 用指定的大小和格式初始化 Bitmap 类的新实例。
公共方法 Bitmap(Int32, Int32, Int32, PixelFormat, IntPtr) 用指定的大小、像素格式和像素数据初始化 Bitmap 类的新实例。
页首 属性
  名称 说明
公共属性 Flags 获取该 Image 的像素数据的特性标志。 (继承自 Image。)
公共属性 FrameDimensionsList 获取 GUID 的数组,这些 GUID 表示此 Image 中帧的维数。 (继承自 Image。)
公共属性 Height 获取此 Image 的高度(以像素为单位)。 (继承自 Image。)
公共属性 HorizontalResolution 获取此 Image 的水平分辨率(以“像素/英寸”为单位)。 (继承自 Image。)
公共属性 Palette 获取或设置用于此 Image 的调色板。 (继承自 Image。)
公共属性 PhysicalDimension 获取此图像的宽度和高度。 (继承自 Image。)
公共属性 PixelFormat 获取此 Image 的像素格式。 (继承自 Image。)
公共属性 PropertyIdList 获取存储于该 Image 中的属性项的 ID。 (继承自 Image。)
公共属性 PropertyItems 获取存储于该 Image 中的所有属性项(元数据片)。 (继承自 Image。)
公共属性 RawFormat 获取此 Image 的文件格式。 (继承自 Image。)
公共属性 Size 获取此图像的以像素为单位的宽度和高度。 (继承自 Image。)
公共属性 Tag 获取或设置提供有关图像附加数据的对象。 (继承自 Image。)
公共属性 VerticalResolution 获取此 Image 的垂直分辨率(以“像素/英寸”为单位)。 (继承自 Image。)
公共属性 Width 获取此 Image 的宽度(以像素为单位)。 (继承自 Image。)
页首 方法
声明:该文观点仅代表作者本人,牛骨文系教育信息发布平台,牛骨文仅提供信息存储空间服务。