Image Filters

Overview

Use updateImageFilter to apply per-image filters. Hue and invert are supported alongside brightness, contrast, saturation, blur, sepia, and grayscale.

API

editor.updateImageFilter(imageId, 'hue', 15)
editor.updateImageFilter(imageId, 'invert', 1)
editor.resetImageFilters(imageId)

Notes

  • Use value = 0 to remove a filter.
  • Use resetImageFilters() to clear the full filter stack in one history step.
  • Hue uses the HSV filter pipeline, so hue and saturation can be combined.

Example

editor.updateImageFilter(imageId, 'brightness', 0.2)
editor.updateImageFilter(imageId, 'hue', 30)
editor.updateImageFilter(imageId, 'invert', 1)