GdPicture image identifier.
Brightness adjustment between -100 and 100.
Contrast adjustment between -100 and 100.
Saturation adjustment between -100 and 100.
Gamma adjustment between -100 and 100.
Example





In This Topic

SetBCSG Method (GdPictureImaging)

In This Topic
Adjust in one shot, the Brightness, Contrast, Saturation & Gamma in a GdPicture image or in an area of a GdPicture image defined by SetROI() method. This method is faster than successive calls to any of SetBrightness, SetContrast, SetSaturation & SetGammaCorrection methods.
Syntax
'Declaration

 

Public Function SetBCSG( _

   ByVal ImageID As Integer, _

   ByVal Brightness As Integer, _

   ByVal Contrast As Integer, _

   ByVal Saturation As Integer, _

   ByVal Gamma As Integer _

) As GdPictureStatus
public GdPictureStatus SetBCSG( 

   int ImageID,

   int Brightness,

   int Contrast,

   int Saturation,

   int Gamma

)
public function SetBCSG( 

    ImageID: Integer;

    Brightness: Integer;

    Contrast: Integer;

    Saturation: Integer;

    Gamma: Integer

): GdPictureStatus; 
public function SetBCSG( 

   ImageID : int,

   Brightness : int,

   Contrast : int,

   Saturation : int,

   Gamma : int

) : GdPictureStatus;
public: GdPictureStatus SetBCSG( 

   int ImageID,

   int Brightness,

   int Contrast,

   int Saturation,

   int Gamma

) 
public:

GdPictureStatus SetBCSG( 

   int ImageID,

   int Brightness,

   int Contrast,

   int Saturation,

   int Gamma

) 

Parameters

ImageID
GdPicture image identifier.
Brightness
Brightness adjustment between -100 and 100.
Contrast
Contrast adjustment between -100 and 100.
Saturation
Saturation adjustment between -100 and 100.
Gamma
Gamma adjustment between -100 and 100.

Return Value

A member of the GdPictureStatus enumeration.
Example
Adjusting the Brightness, Contrast, Saturation and Gamma in an image and saving as a png.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())

{

    int imageID = gdpictureImaging.CreateGdPictureImageFromFile("image.jpg", false);

    gdpictureImaging.SetBCSG(imageID, 20, 20, -20, -20);

    gdpictureImaging.SaveAsPNG(imageID, "output.png");

    gdpictureImaging.ReleaseGdPictureImage(imageID);

}
See Also