Filters
Apply visual filters to the image. All filters accept an intensity parameter (0 to 1).
editor.filter(type: FilterType, intensity?: number);Available Filters
| Filter | Description | Default Intensity |
|---|---|---|
| grayscale | Convert to black and white | 1.0 |
| sepia | Warm, vintage brown tones | 1.0 |
| blur | Gaussian blur effect | 1.0 |
| sharpen | Enhance edges and details | 1.0 |
| vintage | Retro look with vignette | 1.0 |
| invert | Negative/inverted colors | 1.0 |
| vignette | Darkened edges | 1.0 |
| posterize | Reduce color levels | 1.0 |
| pixelate | Pixelated/mosaic effect | 1.0 |
| edgeDetection | Sobel edge detection | 1.0 |
Examples
// Full intensity grayscale
editor.filter('grayscale');
// 50% sepia effect
editor.filter('sepia', 0.5);
// Light blur
editor.filter('blur', 0.3);
// Combine multiple filters
editor
.filter('vintage', 0.7)
.filter('vignette', 0.5);