GdPicture.NET.14.API
GdPicture14 Namespace / GdPictureImaging Class / KeepGreenComponent Method
GdPicture image identifier.
Example





In This Topic
KeepGreenComponent Method (GdPictureImaging)
In This Topic
Keeps only the green color component of a GdPicture image or of an area of a GdPicture image defined by SetROI() method.
Syntax
'Declaration
 
Public Function KeepGreenComponent( _
   ByVal ImageID As Integer _
) As GdPictureStatus
public GdPictureStatus KeepGreenComponent( 
   int ImageID
)
public function KeepGreenComponent( 
    ImageID: Integer
): GdPictureStatus; 
public function KeepGreenComponent( 
   ImageID : int
) : GdPictureStatus;
public: GdPictureStatus KeepGreenComponent( 
   int ImageID
) 
public:
GdPictureStatus KeepGreenComponent( 
   int ImageID
) 

Parameters

ImageID
GdPicture image identifier.

Return Value

A member of the GdPictureStatus enumeration.
Remarks
This method is used in the "Image Processing" Demo.
Example
Filtering a jpeg image so only the green component is kept.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    int imageID = gdpictureImaging.CreateGdPictureImageFromFile("image.jpg", false);
 
    // Keep only the blue color component.
    gdpictureImaging.KeepGreenComponent(imageID);
    gdpictureImaging.SaveAsJPEG(imageID, "image.jpg", 75);
    gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also