Namespace: Filters

Konva. Filters

Source:
konva.js

Methods


<static> Blur(imageData)

Blur Filter

Parameters:
Name Type Description
imageData Object
Source:
konva.js
Example
node.cache();
node.filters([Konva.Filters.Blur]);
node.blurRadius(10);

<static> Brighten(imageData)

Brighten Filter.

Parameters:
Name Type Description
imageData Object
Source:
konva.js
Example
node.cache();
node.filters([Konva.Filters.Brighten]);
node.brightness(0.8);

<static> Contrast(imageData)

Contrast Filter.

Parameters:
Name Type Description
imageData Object
Source:
konva.js
Example
node.cache();
node.filters([Konva.Filters.Contrast]);
node.contrast(10);

<static> Emboss(imageData)

Emboss Filter.
Pixastic Lib - Emboss filter - v0.1.0
Copyright (c) 2008 Jacob Seidelin, jseidelin@nihilogic.dk, http://blog.nihilogic.dk/
License: [http://www.pixastic.com/lib/license.txt]

Parameters:
Name Type Description
imageData Object
Source:
konva.js
Example
node.cache();
node.filters([Konva.Filters.Emboss]);
node.embossStrength(0.8);
node.embossWhiteLevel(0.3);
node.embossDirection('right');
node.embossBlend(true);

<static> Enhance(imageData)

Enhance Filter. Adjusts the colors so that they span the widest
possible range (ie 0-255). Performs wh pixel reads and wh pixel
writes.

Parameters:
Name Type Description
imageData Object
Author:
  • ippo615
Source:
konva.js
Example
node.cache();
node.filters([Konva.Filters.Enhance]);
node.enhance(0.4);

<static> Grayscale(imageData)

Grayscale Filter

Parameters:
Name Type Description
imageData Object
Source:
konva.js
Example
node.cache();
node.filters([Konva.Filters.Grayscale]);

<static> HSL(imageData)

HSL Filter. Adjusts the hue, saturation and luminance (or lightness)

Parameters:
Name Type Description
imageData Object
Author:
  • ippo615
Source:
konva.js
Example
image.filters([Konva.Filters.HSL]);
image.luminance(0.2);

<static> HSV(imageData)

HSV Filter. Adjusts the hue, saturation and value

Parameters:
Name Type Description
imageData Object
Author:
  • ippo615
Source:
konva.js
Example
image.filters([Konva.Filters.HSV]);
image.value(200);

<static> Invert(imageData)

Invert Filter

Parameters:
Name Type Description
imageData Object
Source:
konva.js
Example
node.cache();
node.filters([Konva.Filters.Invert]);

<static> Mask(imageData)

Mask Filter

Parameters:
Name Type Description
imageData Object
Source:
konva.js
Example
node.cache();
node.filters([Konva.Filters.Mask]);
node.threshold(200);

<static> Noise(imageData)

Noise Filter. Randomly adds or substracts to the color channels

Parameters:
Name Type Description
imageData Object
Author:
  • ippo615
Source:
konva.js
Example
node.cache();
node.filters([Konva.Filters.Noise]);
node.noise(0.8);

<static> Pixelate(imageData)

Pixelate Filter. Averages groups of pixels and redraws
them as larger pixels

Parameters:
Name Type Description
imageData Object
Author:
  • ippo615
Source:
konva.js
Example
node.cache();
node.filters([Konva.Filters.Pixelate]);
node.pixelSize(10);

<static> Posterize(imageData)

Posterize Filter. Adjusts the channels so that there are no more
than n different values for that channel. This is also applied
to the alpha channel.

Parameters:
Name Type Description
imageData Object
Author:
  • ippo615
Source:
konva.js
Example
node.cache();
node.filters([Konva.Filters.Posterize]);
node.levels(0.8); // between 0 and 1

<static> RGB(imageData)

RGB Filter

Parameters:
Name Type Description
imageData Object
Author:
  • ippo615
Source:
konva.js
Example
node.cache();
node.filters([Konva.Filters.RGB]);
node.blue(120);
node.green(200);

<static> RGBA(imageData)

RGBA Filter

Parameters:
Name Type Description
imageData Object
Author:
  • codefo
Source:
konva.js
Example
node.cache();
node.filters([Konva.Filters.RGBA]);
node.blue(120);
node.green(200);
node.alpha(0.3);

<static> Sepia(imageData)

Parameters:
Name Type Description
imageData Object
Source:
konva.js
Example
node.cache();
node.filters([Konva.Filters.Sepia]);

<static> Solarize(imageData)

Solarize Filter
Pixastic Lib - Solarize filter - v0.1.0
Copyright (c) 2008 Jacob Seidelin, jseidelin@nihilogic.dk, http://blog.nihilogic.dk/
License: [http://www.pixastic.com/lib/license.txt]

Parameters:
Name Type Description
imageData Object
Source:
konva.js
Example
node.cache();
node.filters([Konva.Filters.Solarize]);

<static> Threshold(imageData)

Threshold Filter. Pushes any value above the mid point to
the max and any value below the mid point to the min.
This affects the alpha channel.

Parameters:
Name Type Description
imageData Object
Author:
  • ippo615
Source:
konva.js
Example
node.cache();
node.filters([Konva.Filters.Threshold]);
node.threshold(0.1);