p5.Image filter() Method
filter( filterType, filterParam )
Parameters: This function accepts two parameters as mentioned above and described below.
- filterType: It is a constant which defines the preset to be used as the filter. It can have the values of THRESHOLD, GRAY, OPAQUE, INVERT, POSTERIZE, BLUR, ERODE, DILATE, or BLUR.
- filterParam: It is a number that is unique to each filter and affects the functionality of the filter. It is an optional parameter.
Example 1: The example below illustrates the filter() method in p5.js.
Online editor: https://editor.p5js.org/
Environment Setup: https://www.geeksforgeeks.org/p5-js-soundfile-object-installation-and-methods/
Please Login to comment...