ImageCodecInfo 类

定义

ImageCodecInfo 类可提供必要的存储成员和方法,以检索与已安装的图像编码器和解码器(统称编码解码器)相关的所有信息。The ImageCodecInfo class provides the necessary storage members and methods to retrieve all pertinent information about the installed image encoders and decoders (called codecs). 不可继承。Not inheritable.

public ref class ImageCodecInfo sealed
[System.Runtime.InteropServices.ComVisible(false)]
public sealed class ImageCodecInfo
type ImageCodecInfo = class
Public NotInheritable Class ImageCodecInfo
继承
ImageCodecInfo
属性

注解

Gdi + 使用图像编码器将存储在对象中Bitmap的图像转换为各种文件格式。GDI+ uses image encoders to convert the images stored in Bitmap objects to various file formats. 对于 BMP、JPEG、GIF、TIFF 和 PNG 格式, 图像编码器内置于 GDI + 中。Image encoders are built into GDI+ for the BMP, JPEG, GIF, TIFF, and PNG formats. 当您调用Save Image对象的或SaveAdd方法时, 将调用编码器。An encoder is invoked when you call the Save or SaveAdd method of a Image object.

属性

Clsid

获取或设置 Guid 结构,其中包含能识别特定编码解码器的 GUID。Gets or sets a Guid structure that contains a GUID that identifies a specific codec.

CodecName

获取或设置包含编码解码器名称的字符串。Gets or sets a string that contains the name of the codec.

DllName

获取或设置包含存放编码解码器的 DLL 的路径名字符串。Gets or sets string that contains the path name of the DLL that holds the codec. 如果编码解码器不在 DLL 中,则该指针为 nullIf the codec is not in a DLL, this pointer is null.

FilenameExtension

获取或设置包含编码解码器中使用的文件扩展名的字符串。Gets or sets string that contains the file name extension(s) used in the codec. 这些扩展名用分号分隔。The extensions are separated by semicolons.

Flags

获取或设置用于存储有关编码解码器的其他信息的 32 位值。Gets or sets 32-bit value used to store additional information about the codec. 该属性从 ImageCodecFlags 枚举返回若干标志的组合。This property returns a combination of flags from the ImageCodecFlags enumeration.

FormatDescription

获取或设置描述编码解码器的文件格式的字符串。Gets or sets a string that describes the codec's file format.

FormatID

获取或设置 Guid 结构,其中包含用于识别编码解码器格式的 GUID。Gets or sets a Guid structure that contains a GUID that identifies the codec's format.

MimeType

获取或设置包含编码解码器的多用途网际邮件扩充协议 (MIME) 类型的字符串。Gets or sets a string that contains the codec's Multipurpose Internet Mail Extensions (MIME) type.

SignatureMasks

获取或设置可用作筛选器的二维字节数组。Gets or sets a two dimensional array of bytes that can be used as a filter.

SignaturePatterns

获取或设置表示编码解码器签名的二维字节数组。Gets or sets a two dimensional array of bytes that represents the signature of the codec.

Version

获取或设置编码解码器的版本号。Gets or sets the version number of the codec.

方法

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetImageDecoders()

返回 ImageCodecInfo 对象的数组,这些对象包含有关内置在 GDI+ 中的图像解码器的信息。Returns an array of ImageCodecInfo objects that contain information about the image decoders built into GDI+.

GetImageEncoders()

返回 ImageCodecInfo 对象的数组,这些对象包含有关内置在 GDI+ 中的图像编码器的信息。Returns an array of ImageCodecInfo objects that contain information about the image encoders built into GDI+.

GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

适用于

另请参阅