GdPicture.NET Reference Guide
FxMax Method (GdPictureImaging)
Example 





GdPicture14 Namespace > GdPictureImaging Class : FxMax Method
GdPicture Image Identifier.
How much smaller should objects become in each direction of the four directions, left, right, top, and bottom. This value should be larger than 1 and smaller than Image's Smaller Dimension (Width or Height) divided by 2. If a value entered is out of range, the method return value will be GdPictureStatus.InvalidParameter.
Performs a Maximum filter (Dilate Filter)of any size of kernel (amount of pixels included in operation) on a GdPicture image or on an area of a GdPicture image defined by SetROI() method. It selects the Maximum value or the neighboring pixels to each pixel and gives it that value. Basically, in binary images, it makes objects in the become smaller, and in colored images it makes the image brighter because the darker objects shrink.
Syntax
'Declaration
 
Public Function FxMax( _
   ByVal ImageID As Integer, _
   ByVal KernelSize As Integer _
) As GdPictureStatus
public function FxMax( 
    ImageID: Integer;
    KernelSize: Integer
): GdPictureStatus; 
public function FxMax( 
   ImageID : int,
   KernelSize : int
) : GdPictureStatus;

Parameters

ImageID
GdPicture Image Identifier.
KernelSize
How much smaller should objects become in each direction of the four directions, left, right, top, and bottom. This value should be larger than 1 and smaller than Image's Smaller Dimension (Width or Height) divided by 2. If a value entered is out of range, the method return value will be GdPictureStatus.InvalidParameter.

Return Value

A member of the GdPictureStatus enumeration.
Example
Applying a maximum filter on image.
Dim oGdPictureImaging As New GdPictureImaging
Dim ImageID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("input.png")
If imageId <> 0 Then
   Dim KernelSize As Integer = 4
   oGdPictureImaging.FxMax(ImageID, KernelSize)
   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
FxDilate Method
FxMin Method