GdPicture.NET.14.API
GdPicture14 Namespace / GdPictureImaging Class / SetGammaCorrection Method
GdPicture image identifier.
Gamma adjustment between -100 and 100.
Example





In This Topic
SetGammaCorrection Method (GdPictureImaging)
In This Topic
Performs Gamma Correction in a GdPicture image or in an area of a GdPicture image defined by SetROI() method.
Syntax
'Declaration
 
Public Function SetGammaCorrection( _
   ByVal ImageID As Integer, _
   ByVal Gamma As Integer _
) As GdPictureStatus
public GdPictureStatus SetGammaCorrection( 
   int ImageID,
   int Gamma
)
public function SetGammaCorrection( 
    ImageID: Integer;
    Gamma: Integer
): GdPictureStatus; 
public function SetGammaCorrection( 
   ImageID : int,
   Gamma : int
) : GdPictureStatus;
public: GdPictureStatus SetGammaCorrection( 
   int ImageID,
   int Gamma
) 
public:
GdPictureStatus SetGammaCorrection( 
   int ImageID,
   int Gamma
) 

Parameters

ImageID
GdPicture image identifier.
Gamma
Gamma adjustment between -100 and 100.

Return Value

A member of the GdPictureStatus enumeration.
Remarks
This method is used in the "Image Processing" Demo.
Example
Performing Gamma Correction on an 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("image.jpg", true);
 
    // Set the gamma intensity [-100;100].
    int gamma = 70;
 
    // Apply the gamma value to an image.
    gdpictureImaging.SetGammaCorrection(imageID, gamma);
    gdpictureImaging.SaveAsJPEG(imageID, "image.jpg");
    gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also