GdPicture.NET.14.API
GdPicture14 Namespace / GdPictureImaging Class / ScaleRedComponent Method
GdPicture image identifier.
Scale factor.
Example





ScaleRedComponent Method (GdPictureImaging)
Scales the red color component of a GdPicture image or of an area of a GdPicture image defined by SetROI() method.
Syntax
'Declaration
 
Public Function ScaleRedComponent( _
   ByVal ImageID As Integer, _
   ByVal Factor As Single _
) As GdPictureStatus
 

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 red component in an image and saving as a png.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    int imageID = gdpictureImaging.CreateGdPictureImageFromFile("image.jpg", false);
    gdpictureImaging.ScaleRedComponent(imageID, 2);
    gdpictureImaging.SaveAsPNG(imageID, "output.png");
    gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also