ImageAttributes 函式

Windows GDI+ 會公開一般 API,其中包含大約 600 個函式,這些函式是在 Gdiplus.dll 中實作,並在 Gdiplusflat.h 中宣告。 GDI+ 一般 API 中的函式會以大約 40 個 C++ 類別的集合包裝。 建議您不要直接呼叫一般 API 中的函式。 每當呼叫 GDI+時,您應該呼叫 C++ 包裝函式所提供的方法和函式來執行此動作。 Microsoft 產品支援服務不會提供直接呼叫一般 API 的程式代碼支援。 如需使用這些包裝函式方法的詳細資訊,請參閱 GDI+ 一般 API

下列一般 API 函式會由 ImageAttributes C++ 類別包裝。

ImageAttributes 函式和對應的包裝函式方法

一般函式 包裝函式方法 備註
GpStatus WINGDIPAPI GdipCreateImageAttributes(GpImageAttributes **imageattr)
ImageAttributes::ImageAttributes() 建立 ImageAttributes 物件。
GpStatus WINGDIPAPI GdipCloneImageAttributes(GDIPCONST GpImageAttributes *imageattr, GpImageAttributes **cloneImageattr)
ImageAttributes* ImageAttributes::Clone() const 製作此 ImageAttributes 對象的複本。
GpStatus WINGDIPAPI GdipDisposeImageAttributes(GpImageAttributes *imageattr)
ImageAttributes::~ImageAttributes() 釋放 ImageAttributes 物件所使用的資源。
GpStatus WINGDIPAPI GdipSetImageAttributesToIdentity(GpImageAttributes *imageattr, ColorAdjustType type)
Status ImageAttributes::SetToIdentity( IN ColorAdjustType type = ColorAdjustTypeDefault ) 將指定類別的色彩調整矩陣設定為識別矩陣。
GpStatus WINGDIPAPI GdipResetImageAttributes(GpImageAttributes *imageattr, ColorAdjustType type)
Status ImageAttributes::Reset( IN ColorAdjustType type = ColorAdjustTypeDefault ) 將指定類別的色彩調整矩陣設定為識別矩陣。
GpStatus WINGDIPAPI GdipSetImageAttributesColorMatrix(GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag, GDIPCONST ColorMatrix* colorMatrix, GDIPCONST ColorMatrix* grayMatrix, ColorMatrixFlags 旗標)
Status ImageAttributes::SetColorMatrix( IN const ColorMatrix *colorMatrix, IN ColorMatrixFlags mode = ColorMatrixFlagsDefault, IN ColorAdjustType type = ColorAdjustTypeDefault )Status ImageAttributes::ClearColorMatrix(IN ColorAdjustType type = ColorAdjustTypeDefault) 設定指定分類的彩色調整矩陣。 一般函式中的 enableFlag 參數是布爾值,指定是否為類型參數所指定的類別啟用個別色彩調整。 ImageAttributes::SetColorMatrix 會將 enableFlag 設定TRUE,而 ImageAttributes::ClearColorMatrix 會將 enableFlag 設定FALSE
清除指定分類的彩色調整矩陣。 grayMatrix 參數會指定當 flags 參數值為 ColorMatrixFlagsAltGray 時,要用於調整灰色陰影的矩陣。
GpStatus WINGDIPAPI GdipSetImageAttributesThreshold(GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag, REAL threshold)
Status ImageAttributes::SetThreshold( IN REAL threshold, IN ColorAdjustType type = ColorAdjustTypeDefault )
Status ImageAttributes::ClearThreshold(IN ColorAdjustType type = ColorAdjustTypeDefault)
設定指定分類的閾值 (透明度範圍)。
flat 函式中的 enableFlag 參數是布爾值,指定是否為類型參數所指定的類別啟用個別臨界值。 ImageAttributes::SetThreshold set enableFlag to TRUE,ImageAttributes::ClearThreshold sets enableFlag to FALSE.清除指定類別的臨界值。
GpStatus WINGDIPAPI GdipSetImageAttributesGamma(GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag, REAL gamma)
Status ImageAttributes::SetGamma(IN REAL gamma, IN ColorAdjustType type = ColorAdjustTypeDefault)
Status ImageAttributes::ClearGamma(IN ColorAdjustType type = ColorAdjustTypeDefault)
設定指定分類的 Gamma 值。 flat 函式中的 enableFlag 參數是布爾值,指定是否為類型參數所指定的類別啟用個別伽瑪。 ImageAttributes::SetGamma 會將 enableFlag 設定TRUE,而 ImageAttributes::ClearGamma 會將 enableFlag 設定FALSE
停用指定分類的 Gamma 修正。
GpStatus WINGDIPAPI GdipSetImageAttributesNoOp(GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag)
Status ImageAttributes::SetNoOp( IN ColorAdjustType type = ColorAdjustTypeDefault )
Status ImageAttributes::ClearNoOp(IN ColorAdjustType type = ColorAdjustTypeDefault)
關閉指定分類的彩色調整。 您可以呼叫 ImageAttributes::ClearNoOp 方法,以恢復呼叫 ImageAttributes::SetNoOp 方法之前已備妥的色彩調整設定。 一般函式中的 enableFlag 參數是布爾值,指定是否為類型參數所指定的類別啟用色彩調整。 ImageAttributes::SetNoOp 會將 enableFlag 設定TRUE,而 ImageAttributes::ClearNoOp 會將 enableFlag 設定FALSE
清除指定類別的 NoOp 設定。
GpStatus WINGDIPAPI GdipSetImageAttributesColorKeys(GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag, ARGB colorLow, ARGB colorHigh)
Status ImageAttributes::SetColorKey( IN const Color& colorLow, IN const Color& colorHigh, IN ColorAdjustType type = ColorAdjustTypeDefault )
Status ImageAttributes::ClearColorKey(IN ColorAdjustType type = ColorAdjustTypeDefault)
設定指定分類的色鍵 (透明度範圍)。 一般函式中的 enableFlag 參數是布爾值,指定是否為類型參數所指定的類別啟用個別的透明度範圍。 ImageAttributes::SetColorKey set enableFlag to TRUE,而 ImageAttributes::ClearColorKey set enableFlag to FALSE
清除指定分類的色鍵 (透明度範圍)。
GpStatus WINGDIPAPI GdipSetImageAttributesOutputChannel(GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag, ColorChannelFlags channelFlags)
Status ImageAttributes::SetOutputChannel( IN ColorChannelFlags channelFlags, IN ColorAdjustType type = ColorAdjustTypeDefault )
Status ImageAttributes::ClearOutputChannel(IN ColorAdjustType type = ColorAdjustTypeDefault)
設定指定類別的青色洋紅-黃色-黑色 (CMYK) 輸出通道。 flat 函式中的 enableFlag 參數是 Boolean 值,指定是否為類型參數所指定的類別啟用個別輸出通道。 ImageAttributes::SetOutputChannel 會將 enableFlag 設定TRUE,而 ImageAttributes::ClearOutputChannel 會將 enableFlag 設定FALSE
清除指定類別的青色洋紅-黃色-黑色 (CMYK) 輸出通道設定。
GpStatus WINGDIPAPI GdipSetImageAttributesOutputChannelColorProfile(GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag, GDIPCONST WCHAR *colorProfileFilename)
Status ImageAttributes::SetOutputChannelColorProfile( IN const WCHAR *colorProfileFilename, IN ColorAdjustType type = ColorAdjustTypeDefault )
Status ImageAttributes::ClearOutputChannelColorProfile(IN ColorAdjustType type = ColorAdjustTypeDefault)
設定指定分類的輸出色頻色彩設定檔案。 一般函式中的 enableFlag 參數是布爾值,指定是否為類型參數所指定的類別啟用個別的輸出通道色彩設定檔。 ImageAttributes::SetOutputChannelColorProfile 會將 enableFlag 設定TRUE,而 ImageAttributes::ClearOutputChannelColorProfile 會將 enableFlag 設定FALSE
清除指定分類之輸出色頻色彩設定檔的設定。
GpStatus WINGDIPAPI GdipSetImageAttributesRemapTable(GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag, UINT mapSize, GDIPCONST ColorMap *map)
Status ImageAttributes::SetRemapTable( IN UINT mapSize, IN const ColorMap *map, IN ColorAdjustType type = ColorAdjustTypeDefault )
Status ImageAttributes::ClearRemapTable(IN ColorAdjustType type = ColorAdjustTypeDefault)
設定指定分類的色彩重新對應表。 一般函式中的 enableFlag 參數是布爾值,指定是否為類型參數所指定的類別啟用個別的色彩重新對應數據表。 ImageAttributes::SetRemapTable 會將 enableFlag 設定TRUE,而 ImageAttributes::ClearRemapTable 會將 enableFlag 設定FALSE
清除指定分類的色彩重新對應表。
GpStatus WINGDIPAPI GdipSetImageAttributesWrapMode(GpImageAttributes *imageAttr, WrapMode wrap, ARGB argb, BOOL clamp )
Status ImageAttributes::SetWrapMode(IN WrapMode wrap, IN const Color& color = Color(), IN BOOL clamp = FALSE
設定此 ImageAttributes 物件的換行模式
GpStatus WINGDIPAPI GdipSetImageAttributesICMMode(GpImageAttributes *imageAttr, BOOL on )
未由包裝函式方法呼叫。
此函式會將內部狀態變數設定為 on 參數所指定的值。 如果此值為 TRUE,則會使用影像色彩管理 (ICM) 進行所有色彩調整。 如果值為 FALSE,則不會使用 ICM。
GpStatus WINGDIPAPI GdipGetImageAttributesAdjustedPalette(GpImageAttributes *imageAttr, ColorPalette * colorPalette, ColorAdjustType colorAdjustType )
Status ImageAttributes::GetAdjustedPalette(IN OUT ColorPalette* colorPalette, IN ColorAdjustType colorAdjustType) const
根據指定分類的調整設定來調整調色盤中的色彩。
GpStatus WINGDIPAPI GdipSetImageAttributesCachedBackground(GpImageAttributes *imageattr, BOOL enableFlag)
未由包裝函式方法呼叫。
設定或清除指定之 GpImageAttributes 物件的 CachedBackground 成員。 GDI+ 不會使用 CachedBackground 成員,因此呼叫此函式沒有任何作用。 imageattr 參數會指定 GpImageAttributes 物件。 enableFlag 參數會指定 CachedBackground 成員是否已設定 (TRUE) 或已清除 (FALSE)。