GdPicture.NET Reference Guide
FxColorize Method (GdPictureImaging)
Example 





GdPicture14 Namespace > GdPictureImaging Class : FxColorize Method
GdPicture Image Identifier.
Hue [0 - 100].
Saturation [0 - 100].
Luminosity [0 - 100].
Performs "colorization" effect on a GdPicture image or on an area of a GdPicture image defined by SetROI().
Syntax
'Declaration
 
Public Function FxColorize( _
   ByVal ImageID As Integer, _
   ByVal Hue As Single, _
   ByVal Saturation As Single, _
   ByVal Luminosity As Single _
) As GdPictureStatus
public function FxColorize( 
    ImageID: Integer;
    Hue: Single;
    Saturation: Single;
    Luminosity: Single
): GdPictureStatus; 
public function FxColorize( 
   ImageID : int,
   Hue : float,
   Saturation : float,
   Luminosity : float
) : GdPictureStatus;

Parameters

ImageID
GdPicture Image Identifier.
Hue
Hue [0 - 100].
Saturation
Saturation [0 - 100].
Luminosity
Luminosity [0 - 100].

Return Value

A member of the GdPictureStatus enumeration.
Remarks
This method is used in the "Image Processing" Demo.
Example
Applying a colorize effect on the image using set hue, saturation, and luminosity values.
Dim oGdPictureImaging As New GdPictureImaging
Dim ImageID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("input.png")
If imageId <> 0 Then
   Dim Hue As Integer = 50
   Dim Saturation As Integer = 50
   Dim Luminosity As Integer = 25
   oGdPictureImaging.FxColorize(ImageID, Hue, Saturation, Luminosity)
   oGdPictureImaging.SaveAsPNG(ImageID, "output.png")
   oGdPictureImaging.ReleaseGdPictureImage(ImageID)
Else
   MessageBox.Show("Error: " + oGdPictureImaging.GetStat().ToString())
End If
See Also

Reference

GdPictureImaging Class
GdPictureImaging Members
SetROI Method
ResetROI Method