GdPicture.NET.14.API
GdPicture14 Namespace / GdPictureImaging Class / FxStretchContrast Method
GdPicture image identifier.
Example





In This Topic
FxStretchContrast Method (GdPictureImaging)
In This Topic
Performs a contrast histogram stretch filter on a GdPicture image or on an area of a GdPicture image defined by SetROI() method.
Syntax
'Declaration
 
Public Function FxStretchContrast( _
   ByVal ImageID As Integer _
) As GdPictureStatus
public GdPictureStatus FxStretchContrast( 
   int ImageID
)
public function FxStretchContrast( 
    ImageID: Integer
): GdPictureStatus; 
public function FxStretchContrast( 
   ImageID : int
) : GdPictureStatus;
public: GdPictureStatus FxStretchContrast( 
   int ImageID
) 
public:
GdPictureStatus FxStretchContrast( 
   int ImageID
) 

Parameters

ImageID
GdPicture image identifier.

Return Value

A member of the GdPictureStatus enumeration.
Example
Applying the contrast stretch effect to a colored 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("color_image.jpg", true);
 
    // Stretch the contrast levels of an image.
    gdpictureImaging.FxStretchContrast(imageID);
    gdpictureImaging.SaveAsJPEG(imageID, "color_image.jpg");
    gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also