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





In This Topic
ScaleRedComponent Method (GdPictureImaging)
In This Topic
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
public GdPictureStatus ScaleRedComponent( 
   int ImageID,
   float Factor
)
public function ScaleRedComponent( 
    ImageID: Integer;
    Factor: Single
): GdPictureStatus; 
public function ScaleRedComponent( 
   ImageID : int,
   Factor : float
) : GdPictureStatus;
public: GdPictureStatus ScaleRedComponent( 
   int ImageID,
   float Factor
) 
public:
GdPictureStatus ScaleRedComponent( 
   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 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