Class: ContrastComponent

ContrastComponent()

Creates a Contrast component.

Constructor

new ContrastComponent()

Source:

Members

(static, non-null) STATE :Object

State definition.
Type:
  • Object
Source:

Methods

attached()

Source:

detached()

Source:

preview(imageData) → {Promise}

Applies a contrast 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 contrast 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 contrast value.
Source:
Returns:
A promise that resolves when the webworker finishes processing the image.
Type
Promise