GdPicture image identifier.
Scale factor.
Example





In This Topic
GdPicture14 Namespace / GdPictureImaging Class / ScaleGreenComponent Method

ScaleGreenComponent Method (GdPictureImaging)

In This Topic
Scales the green color component of a GdPicture image or of an area of a GdPicture image defined by SetROI() method.
Syntax
'Declaration
 
Public Function ScaleGreenComponent( _
   ByVal ImageID As Integer, _
   ByVal Factor As Single _
) As GdPictureStatus
public GdPictureStatus ScaleGreenComponent( 
   int ImageID,
   float Factor
)
public function ScaleGreenComponent( 
    ImageID: Integer;
    Factor: Single
): GdPictureStatus; 
public function ScaleGreenComponent( 
   ImageID : int,
   Factor : float
) : GdPictureStatus;
public: GdPictureStatus ScaleGreenComponent( 
   int ImageID,
   float Factor
) 
public:
GdPictureStatus ScaleGreenComponent( 
   int ImageID,
   float Factor
) 

Parameters

ImageID
GdPicture image identifier.
Factor
Scale factor.

Return Value

A member of the GdPictureStatus enumeration.
Remarks
This method is used in the "Image Processing" Demo.
Example
Rescaling the green component in an image and saving as a png.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    int imageID = gdpictureImaging.CreateGdPictureImageFromFile("image.jpg", false);
    gdpictureImaging.ScaleGreenComponent(imageID, 0.5f);
    gdpictureImaging.SaveAsPNG(imageID, "output.png");
    gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also