ImageAttributes.SetOutputChannelColorProfile 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
設定輸出通道色彩配置檔。
多載
| 名稱 | Description |
|---|---|
| SetOutputChannelColorProfile(String, ColorAdjustType) |
設定特定類別的輸出通道色彩配置檔。 |
| SetOutputChannelColorProfile(String) |
設定輸出通道色彩配置檔為預設類別。 |
SetOutputChannelColorProfile(String, ColorAdjustType)
設定特定類別的輸出通道色彩配置檔。
public:
void SetOutputChannelColorProfile(System::String ^ colorProfileFilename, System::Drawing::Imaging::ColorAdjustType type);
public void SetOutputChannelColorProfile(string colorProfileFilename, System.Drawing.Imaging.ColorAdjustType type);
member this.SetOutputChannelColorProfile : string * System.Drawing.Imaging.ColorAdjustType -> unit
Public Sub SetOutputChannelColorProfile (colorProfileFilename As String, type As ColorAdjustType)
參數
- colorProfileFilename
- String
色彩配置檔的路徑名稱。 如果色彩剖面檔案位於 %SystemRoot%\System32\Spool\Drivers\Color 目錄中,這個參數可以是檔名。 否則,這個參數必須是完全限定的路徑名稱。
- type
- ColorAdjustType
其中的一個元素 ColorAdjustType 指定輸出通道色彩配置檔所設定的類別。
備註
你可以用 和 SetOutputChannelSetOutputChannelColorProfile 方法將影像轉換成 CMYK(青-洋紅-黃-黑)色彩空間,並檢查其中一個 CMYK 色彩通道的強度。 舉例來說,假設你寫了執行以下步驟的程式碼:
建立一個 Image.
建立 ImageAttributes 物件。
將色彩配置檔的路徑名稱傳給 SetOutputChannelColorProfile 物件的方法 ImageAttributes 。
將 和 Image 物件的ImageAttributes路徑傳遞給方法。DrawImage
GDI+ 會使用色彩剖面檔案來計算影像中每個像素的青色成分,渲染後的每個像素會以灰色調表示其青色通道的強度。
物件 ImageAttributes 會維持五個調整類別的色彩與灰階設定:預設、點陣圖、筆刷、筆觸和文字。 例如,你可以為預設類別指定輸出通道色彩剖面檔案,並為點陣圖類別指定不同的輸出通道色彩設定檔。
默認色彩調整和灰階調整設定適用於沒有自己調整設定的所有類別。 例如,如果你從未為點陣圖類別指定任何調整設定,預設設定會套用到點陣圖類別。
一旦您指定特定類別的色彩調整或灰階調整設定,預設調整設定就不再套用至該類別。 例如,假設您指定預設類別的調整設定集合。 如果你透過傳遞BitmapSetOutputChannelColorProfile方法設定點陣分類的輸出通道色彩剖面檔,預設的調整設定都不會套用到點陣圖上。
適用於
SetOutputChannelColorProfile(String)
設定輸出通道色彩配置檔為預設類別。
public:
void SetOutputChannelColorProfile(System::String ^ colorProfileFilename);
public void SetOutputChannelColorProfile(string colorProfileFilename);
member this.SetOutputChannelColorProfile : string -> unit
Public Sub SetOutputChannelColorProfile (colorProfileFilename As String)
參數
- colorProfileFilename
- String
色彩配置檔的路徑名稱。 如果色彩剖面檔案位於 %SystemRoot%\System32\Spool\Drivers\Color 目錄中,這個參數可以是檔名。 否則,這個參數必須是完全限定的路徑名稱。
備註
你可以用 和 SetOutputChannelSetOutputChannelColorProfile 方法將影像轉換成 CMYK(青-洋紅-黃-黑)色彩空間,並檢查其中一個 CMYK 色彩通道的強度。 舉例來說,假設你寫了執行以下步驟的程式碼:
建立一個 Image.
建立 ImageAttributes 物件。
將色彩配置檔的路徑名稱傳給 SetOutputChannelColorProfile 物件的方法 ImageAttributes 。
將 和 Image 物件的ImageAttributes路徑傳遞給方法。DrawImage
GDI+ 會使用色彩剖面檔案來計算影像中每個像素的青色成分,渲染後的每個像素會以灰色調表示其青色通道的強度。
物件 ImageAttributes 會維持五個調整類別的色彩與灰階設定:預設、點陣圖、筆刷、筆觸和文字。 例如,你可以為預設類別指定輸出通道色彩剖面檔案,並為點陣圖類別指定不同的輸出通道色彩設定檔。
默認色彩調整和灰階調整設定適用於沒有自己調整設定的所有類別。 例如,如果你從未為點陣圖類別指定任何調整設定,預設設定會套用到點陣圖類別。