Marblecore Imaging Library Documentation

Documentation Introduction
Documentation / Marblecore Imaging / Methods / FilterCustom

FilterCustom method

Applies a custom filter using a 5x5 matrix, division scale and offset to the image.

Syntax

Boolean FilterCustom(nA1 As Number, nB1 As Number, nC1 As Number, nD1 As Number, nE1 As Number, nA2 As Number, nB2 As Number, nC2 As Number, nD2 As Number, nE2 As Number, nA3 As Number, nB3 As Number, nC3 As Number, nD3 As Number, nE3 As Number, nA4 As Number, nB4 As Number, nC4 As Number, nD4 As Number, nE4 As Number, nA5 As Number, nB5 As Number, nC5 As Number, nD5 As Number, nE5 As Number, nScale As Number, nOffset As Number, nLeft As Number, nTop As Number, nWidth As Number, nHeight As Number)

Return value

Returns true if the function succeeded.

Parameters

ParameterTypeRequiredDescription
nA1NumberYesDescribes the filter matrix element at row 1, column A.
nB1NumberYesDescribes the filter matrix element at row 1, column B.
nC1NumberYesDescribes the filter matrix element at row 1, column C.
nD1NumberYesDescribes the filter matrix element at row 1, column D.
nE1NumberYesDescribes the filter matrix element at row 1, column E.
nA2NumberYesDescribes the filter matrix element at row 2, column A.
nB2NumberYesDescribes the filter matrix element at row 2, column B.
nC2NumberYesDescribes the filter matrix element at row 2, column C.
nD2NumberYesDescribes the filter matrix element at row 2, column D.
nE2NumberYesDescribes the filter matrix element at row 2, column E.
nA3NumberYesDescribes the filter matrix element at row 3, column A.
nB3NumberYesDescribes the filter matrix element at row 3, column B.
nC3NumberYesDescribes the filter matrix element at row 3, column C.
nD3NumberYesDescribes the filter matrix element at row 3, column D.
nE3NumberYesDescribes the filter matrix element at row 3, column E.
nA4NumberYesDescribes the filter matrix element at row 4, column A.
nB4NumberYesDescribes the filter matrix element at row 4, column B.
nC4NumberYesDescribes the filter matrix element at row 4, column C.
nD4NumberYesDescribes the filter matrix element at row 4, column D.
nE4NumberYesDescribes the filter matrix element at row 4, column E.
nA5NumberYesDescribes the filter matrix element at row 5, column A.
nB5NumberYesDescribes the filter matrix element at row 5, column B.
nC5NumberYesDescribes the filter matrix element at row 5, column C.
nD5NumberYesDescribes the filter matrix element at row 5, column D.
nE5NumberYesDescribes the filter matrix element at row 5, column E.
nScaleNumberNoSpecifies the scale of the filter.
nOffsetNumberNoSpecifies the offset of the filter.
nLeftNumberNoOptional parameter which can be used to specify a clipping rectangle. This parameter specifies the left coordinate of the rectangle.
nTopNumberNoOptional parameter which can be used to specify a clipping rectangle. This parameter specifies the top coordinate of the rectangle.
nWidthNumberNoOptional parameter which can be used to specify a clipping rectangle. This parameter specifies the width of the rectangle.
nHeightNumberNoOptional parameter which can be used to specify a clipping rectangle. This parameter specifies the height of the rectangle.

Example

The example below shows the effect of this method and how to use it. You can slide the marker in the before/after picture to see the difference. If you take a look at the example code, assume there is a reference to the Marblecore Imaging object with the name 'MarblecoreImaging'. Transparent parts of the image are displayed using a checkerboard pattern.
 
before
after
 
1 // Load the specified image in memory
2 MarblecoreImaging.LoadFromFile("example-filtercustom-before.jpg");
3 
4 // Execute the operation
5 MarblecoreImaging.FilterCustom(0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, -1, 5, -1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 1);
6 
7 // Save the modified image to the specified file
8 MarblecoreImaging.SaveToFile("example-filtercustom-after.jpg");

Category

Filters, Other

See also

FilterCustomFromFile | FilterCustomFromURL | FilterOffset