MCPcopy
hub / github.com/processing/p5.js / filter

Method filter

src/image/p5.Image.js:1238–1241  ·  view source on GitHub ↗

* Applies an image filter to the image. * * The preset options are: * * `INVERT` * Inverts the colors in the image. No parameter is used. * * `GRAY` * Converts the image to grayscale. No parameter is used. * * `THRESHOLD` * Converts the image to black and white. Pixe

(operation, value)

Source from the content-addressed store, hash-verified

1236 * }
1237 */
1238 filter(operation, value) {
1239 Filters.apply(this.canvas, Filters[operation], value);
1240 this.setModified(true);
1241 }
1242
1243 /**
1244 * Copies a region of pixels from another image into this one.

Callers 15

generateVisualReportFunction · 0.45
sample-linter.mjsFile · 0.45
getParamsFunction · 0.45
flattenOverloadsFunction · 0.45
getAltFunction · 0.45
formatJSDocCommentFunction · 0.45
generateObjectInterfaceFunction · 0.45
generateClassDeclarationFunction · 0.45
generateTypeDefinitionsFunction · 0.45
mFunction · 0.45
p5.sound.min.jsFile · 0.45
CustomErrorFunction · 0.45

Calls 2

setModifiedMethod · 0.95
applyMethod · 0.45

Tested by

no test coverage detected