GdPicture.NET.14.API
GdPicture14 Namespace / GdPictureImaging Class / AdjustRGB Method
GdPicture image identifier.
Value to add to the red component [-255 ; 255].
Value to add to the green component [-255 ; 255].
Value to add to the blue component [-255 ; 255].
Example





In This Topic
AdjustRGB Method (GdPictureImaging)
In This Topic
Increase or decrease the color components of a GdPicture image or of an area of a GdPicture image defined by SetROI() method.
Syntax
'Declaration
 
Public Function AdjustRGB( _
   ByVal ImageID As Integer, _
   ByVal RedAdjust As Integer, _
   ByVal GreenAdjust As Integer, _
   ByVal BlueAdjust As Integer _
) As GdPictureStatus
public GdPictureStatus AdjustRGB( 
   int ImageID,
   int RedAdjust,
   int GreenAdjust,
   int BlueAdjust
)
public function AdjustRGB( 
    ImageID: Integer;
    RedAdjust: Integer;
    GreenAdjust: Integer;
    BlueAdjust: Integer
): GdPictureStatus; 
public function AdjustRGB( 
   ImageID : int,
   RedAdjust : int,
   GreenAdjust : int,
   BlueAdjust : int
) : GdPictureStatus;
public: GdPictureStatus AdjustRGB( 
   int ImageID,
   int RedAdjust,
   int GreenAdjust,
   int BlueAdjust
) 
public:
GdPictureStatus AdjustRGB( 
   int ImageID,
   int RedAdjust,
   int GreenAdjust,
   int BlueAdjust
) 

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.
Remarks
This method is used in the "Image Processing" Demo.
Example
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);
}
See Also