GdPicture.NET Reference Guide
GetColorChannelFlagsK Method (GdPictureImaging)

GdPicture14 Namespace > GdPictureImaging Class : GetColorChannelFlagsK Method
GdPicture Image Identifier.
Returns a new GdPicture image based on the Key (Black) channel of the CMYK color space of a GdPicture image.
Public Function GetColorChannelFlagsK( _
   ByVal ImageID As Integer _
) As Integer
public int GetColorChannelFlagsK( 
   int ImageID
public function GetColorChannelFlagsK( 
    ImageID: Integer
): Integer; 
public function GetColorChannelFlagsK( 
   ImageID : int
) : int;
public: int GetColorChannelFlagsK( 
   int ImageID
int GetColorChannelFlagsK( 
   int ImageID


GdPicture Image Identifier.

Return Value

0: The image could not be created. Use the GetStat() method to determine the reason this method failed. Non-zero: GdPicture Image Identifier. The created image. The ReleaseGdPictureImage() method must be subsequently used to release the image from the memory.
According to Wikipedia, CMYK (short for cyan, magenta, yellow, and key) is a subtractive color model used in color printing. This color model is based on mixing pigments of the following colors in order to make other colors: * C = Cyan. * M = Magenta. * Y = Yellow. * K = Key (Black). CMYK is the standard color model used in offset printing for full-color documents. CMYK, or four-color printing, generates a good final printout with excellent contrast.
Obtaining an image form black channel of the CMYK color space of another.
Dim ImageID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("input.png")
If imageId <> 0 Then
   Dim ImageID2 As Integer = oGdPictureImaging.GetColorChannelFlagsK(ImageID)
   If ImageID2 <> 0 Then
      oGdPictureImaging.SaveAsPNG(ImageID2, "output.png")
   End If
   MessageBox.Show("Error: " + oGdPictureImaging.GetStat().ToString())
End If
See Also


GdPictureImaging Class
GdPictureImaging Members
GetStat Method