Reference Guide
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.
Example





In This Topic
    FxMax Method (GdPictureImaging)
    In This Topic
    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 GdPictureStatus FxMax( 
       int ImageID,
       int KernelSize
    )
    public function FxMax( 
        ImageID: Integer;
        KernelSize: Integer
    ): GdPictureStatus; 
    public function FxMax( 
       ImageID : int,
       KernelSize : int
    ) : GdPictureStatus;
    public: GdPictureStatus FxMax( 
       int ImageID,
       int KernelSize
    ) 
    public:
    GdPictureStatus FxMax( 
       int ImageID,
       int KernelSize
    ) 

    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
    Performing a maximum filter on a jpeg 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);
     
        // Performing a maximum filter.
        gdpictureImaging.FxMax(imageID, 5);
        gdpictureImaging.SaveAsPNG(imageID, "image.png");
        gdpictureImaging.ReleaseGdPictureImage(imageID);
    }
    See Also