Class: SaturationComponent

SaturationComponent()

Creates a Saturation component.

Constructor

new SaturationComponent()

Source:

Members

(static, non-null) STATE :Object

State definition.
Type:
  • Object
Source:

Methods

attached()

Source:

detached()

Source:

preview(imageData) → {Promise}

Applies a saturation filter to the image.
Parameters:
Name Type Description
imageData ImageData The image data representation of the image.
Source:
Returns:
A promise that resolves when the webworker finishes processing the image.
Type
Promise

process(imageData) → {Promise}

Applies a saturation filter to the image.
Parameters:
Name Type Description
imageData ImageData The image data representation of the image.
Source:
Returns:
A promise that resolves when the webworker finishes processing the image.
Type
Promise

requestPreview()

Notifies the editor that this component wants to generate a different preview version of the current image. It debounces the calls.
Source:

spawnWorker_(message) → {Promise}

Spawns a webworker to process the image in a different thread.
Parameters:
Name Type Description
message Object The image and saturation value.
Source:
Returns:
A promise that resolves when the webworker finishes processing the image.
Type
Promise