AdjustRGB Method (GdPictureImaging)
Increase or decrease the color components of a GdPicture image or of an area of a GdPicture image
defined by SetROI() method.
public function AdjustRGB(
: Integer;
: Integer;
: Integer;
: Integer
): GdPictureStatus;
'Declaration
Public Function AdjustRGB( _
ByVal As Integer, _
ByVal As Integer, _
ByVal As Integer, _
ByVal As Integer _
) As GdPictureStatus
Parameters
- ImageID
- GdPicture image identifier.
- RedAdjust
- Value to add to the red component [-255 ; 255].
- GreenAdjust
- Value to add to the green component [-255 ; 255].
- BlueAdjust
- Value to add to the blue component [-255 ; 255].
Return Value
A member of the GdPictureStatus enumeration.
Adjusting the RGB values of the image.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
// LoadInMemory parameter is set to true in order to be able to update the input file.
int imageID = gdpictureImaging.CreateGdPictureImageFromFile("input.jpg", true);
// Choose the intensity of red, blue and green values between [-255 ; 255].
int redAdjust = 50;
int blueAdjust = 0;
int greenAdjust = 100;
// Adjust the RGB values on your image.
gdpictureImaging.AdjustRGB(imageID, redAdjust, greenAdjust, blueAdjust);
gdpictureImaging.SaveAsJPEG(imageID, "input.jpg");
gdpictureImaging.ReleaseGdPictureImage(imageID);
}