🌆 Applies a filter to the image.
See the documentation for q5's filter constants below for more info.
A CSS filter string can also be used. https://developer.mozilla.org/docs/Web/CSS/filter
Not applicable to WebGPU canvases.
filter type or a CSS filter string
Optional
optional value, depends on filter type
await Canvas(200);let logo = await load('/q5js_logo.avif');logo.filter(INVERT);image(logo, -100, -100, 200, 200); Copy
await Canvas(200);let logo = await load('/q5js_logo.avif');logo.filter(INVERT);image(logo, -100, -100, 200, 200);
🌆 Applies a filter to the image.
See the documentation for q5's filter constants below for more info.
A CSS filter string can also be used. https://developer.mozilla.org/docs/Web/CSS/filter
Not applicable to WebGPU canvases.