ImageAttributes.SetOutputChannelColorProfile 方法

定义

设置输出通道颜色配置文件。

重载

名称 说明
SetOutputChannelColorProfile(String, ColorAdjustType)

设置指定类别的输出通道颜色配置文件。

SetOutputChannelColorProfile(String)

设置默认类别的输出通道颜色配置文件。

SetOutputChannelColorProfile(String, ColorAdjustType)

Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs

设置指定类别的输出通道颜色配置文件。

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 颜色通道的强度。 例如,假设你编写执行以下步骤的代码:

  1. 创建 Image

  2. 创建一个 ImageAttributes 对象。

  3. 传递给ColorChannelCSetOutputChannel对象的方法ImageAttributes

  4. 将颜色配置文件的路径名称传递给 SetOutputChannelColorProfile 对象的方法 ImageAttributes

  5. 将对象的路径ImageImageAttributes传递给DrawImage方法。

GDI+ 将使用颜色配置文件来计算图像中每个像素的青色分量,呈现的图像中的每个像素都将是灰色阴影,指示其青色通道的强度。

对象维护五个 ImageAttributes 调整类别的颜色和灰度设置:默认、位图、画笔、笔和文本。 例如,可以为默认类别指定输出通道颜色配置文件,并为位图类别指定其他输出通道颜色配置文件。

默认颜色调整和灰度调整设置适用于没有自己调整设置的所有类别。 例如,如果从未为位图类别指定任何调整设置,则默认设置将应用于位图类别。

指定特定类别的颜色调整或灰度调整设置后,默认调整设置将不再应用于该类别。 例如,假设为默认类别指定调整设置的集合。 如果通过传递给BitmapSetOutputChannelColorProfile方法为位图类别设置输出通道颜色配置文件,则默认调整设置将不适用于位图。

适用于

SetOutputChannelColorProfile(String)

Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs
Source:
ImageAttributes.cs

设置默认类别的输出通道颜色配置文件。

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 颜色通道的强度。 例如,假设你编写执行以下步骤的代码:

  1. 创建 Image

  2. 创建一个 ImageAttributes 对象。

  3. 传递给ColorChannelCSetOutputChannel对象的方法ImageAttributes

  4. 将颜色配置文件的路径名称传递给 SetOutputChannelColorProfile 对象的方法 ImageAttributes

  5. 将对象的路径ImageImageAttributes传递给DrawImage方法。

GDI+ 将使用颜色配置文件来计算图像中每个像素的青色分量,呈现的图像中的每个像素都将是灰色阴影,指示其青色通道的强度。

对象维护五个 ImageAttributes 调整类别的颜色和灰度设置:默认、位图、画笔、笔和文本。 例如,可以为默认类别指定输出通道颜色配置文件,并为位图类别指定其他输出通道颜色配置文件。

默认颜色调整和灰度调整设置适用于没有自己调整设置的所有类别。 例如,如果从未为位图类别指定任何调整设置,则默认设置将应用于位图类别。

适用于