ImageFormat 類別

定義

指定影像的檔案格式。 無法被繼承。

public ref class ImageFormat sealed
public sealed class ImageFormat
[System.ComponentModel.TypeConverter("System.Drawing.ImageFormatConverter, System.Windows.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51")]
public sealed class ImageFormat
[System.ComponentModel.TypeConverter(typeof(System.Drawing.ImageFormatConverter))]
public sealed class ImageFormat
type ImageFormat = class
[<System.ComponentModel.TypeConverter("System.Drawing.ImageFormatConverter, System.Windows.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51")>]
type ImageFormat = class
[<System.ComponentModel.TypeConverter(typeof(System.Drawing.ImageFormatConverter))>]
type ImageFormat = class
Public NotInheritable Class ImageFormat
繼承
ImageFormat
屬性

備註

類別的屬性 ImageFormat 表示影像格式,例如點陣圖 () Bmp 、增強的元檔 () Emf ,以及圖示 () Icon 。 例如,您可以使用 類別的屬性 ImageFormat ,在使用 方法儲存影像時指定影像 Save 格式。 您可以使用 方法來比較兩個影像格式 Equals

注意

在 .NET 6 和更新版本中,只有 Windows 作業系統才支援包含此類型的 System.Drawing.Common 套件。 在跨平臺應用程式中使用此類型會導致編譯時間警告和運行時間例外狀況。 如需詳細資訊,請參閱 僅限 Windows 上支援的 System.Drawing.Common

建構函式

ImageFormat(Guid)

使用指定的 ImageFormat 結構,初始化 Guid 類別的新執行個體。

屬性

Bmp

取得點陣圖 (BMP) 影像格式。

Emf

取得增強型中繼檔 (EMF) 影像格式。

Exif

取得可交換影像檔 (Exchangeable Image File,Exif) 格式。

Gif

取得圖形交換格式 (GIF) 影像格式。

Guid

取得 Guid 結構,表示這個 ImageFormat 物件。

Heif

指定 HEIF) (高效能影像格式。

Icon

取得 Windows 圖示影像格式。

Jpeg

取得 Joint Photographic Experts Group (JPEG) 影像格式。

MemoryBmp

取得記憶體中點陣圖的格式。

Png

取得 W3C 可攜式網路圖形 (W3C Portable Network Graphics,PNG) 影像格式。

Tiff

取得標記的影像檔案格式 (Tagged Image File Format,TIFF) 影像格式。

Webp

指定 WebP 影像格式。

Wmf

取得 Windows 中繼檔 (WMF) 影像格式。

方法

Equals(Object)

傳回數值,表示指定物件是否為等於這個 ImageFormat 物件的 ImageFormat 物件。

GetHashCode()

傳回表示這個物件的雜湊程式碼值。

GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()

將這個 ImageFormat 物件轉換成人們可讀取的字串。

適用於

另請參閱