GdPicture image identifier.
Example





In This Topic
GdPicture14 Namespace / GdPictureImaging Class / KeepRedComponent Method

KeepRedComponent Method (GdPictureImaging)

In This Topic
Keeps only the red color component of a GdPicture image or of an area of a GdPicture image defined by SetROI() method.
Syntax
'Declaration
 
Public Function KeepRedComponent( _
   ByVal ImageID As Integer _
) As GdPictureStatus
public GdPictureStatus KeepRedComponent( 
   int ImageID
)
public function KeepRedComponent( 
    ImageID: Integer
): GdPictureStatus; 
public function KeepRedComponent( 
   ImageID : int
) : GdPictureStatus;
public: GdPictureStatus KeepRedComponent( 
   int ImageID
) 
public:
GdPictureStatus KeepRedComponent( 
   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 red component is kept.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    int imageID = gdpictureImaging.CreateGdPictureImageFromFile("image.jpg", false);
 
    // Keep only the blue color component.
    gdpictureImaging.KeepRedComponent(imageID);
    gdpictureImaging.SaveAsJPEG(imageID, "image.jpg", 75);
    gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also