This plugin allow you to add effects to images and html5 videotags easily. It supports different types of processed effects and overlay
documentention is a work in progress
Render all effects, overlays, filters, etc. Called automatically by the plugin, but you can use this for custom functionality
Returns: obj
, this
Draw the contents of this.element to canvas en reset internal pixel data Called by the plugin#render method, but you can use this for custom functionality
Returns: obj
, this
draw the current pixel-data to the canvas and read the new pixel information from result Called by the process#processcallback method, but you can use this for custom functionality
Returns: obj
, this
Process a callback for each pixel. We loop over all pixels and call the callback for each. This function is used by all processed effects
Parameters
callback: function
, The callback must return an array [r, g, b, a]
Returns: obj
, this
Convert pixels to a pure gray value
Parameters
options: obj
, Convert pixels to a pure gray value
Returns: array
, r, g, b, a
Convert pixels to sepia color
Parameters
options: obj
, Convert pixels to sepia color
Returns: array
, r, g, b, a
Invert r, g and by by subtracting original values from 255
Parameters
options: obj
, Invert r, g and by by subtracting original values from 255
Returns: array
, r, g, b, a
Find edges
Parameters
options: obj
, Find edges
Returns: array
, r, g, b, a
Add randomized noise
Parameters
options: obj
, Add randomized noise
Returns: array
, r, g, b, a
[pixelate description]
Parameters
options: obj
, [pixelate description]
Returns: array
, r, g, b, a
Parameters
options: obj
Returns: array
, r, g, b, a
Parameters
options: obj
Returns: array
, r, g, b, a
Parameters
options: obj
Returns: array
, r, g, b, a
Parameters
options: obj
Returns: array
, r, g, b, a
Parameters
options: obj
Returns: array
, r, g, b, a
Parameters
options: obj
Returns: array
, r, g, b, a
Parameters
options: obj
Returns: array
, r, g, b, a
Parameters
options: obj
Returns: array
, r, g, b, a
Parameters
options: obj
Returns: array
, r, g, b, a
Parameters
options: obj
Returns: array
, r, g, b, a
Add a vignette
Parameters
options: obj
, Add a vignette
Returns: obj
, this
Parameters
options: obj
Returns: array
, r, g, b, a
Parameters
options: obj
Returns: array
, r, g, b, a
Parameters
options: obj
Returns: array
, r, g, b, a
Parameters
options: obj
Returns: array
, r, g, b, a
Parameters
options: obj
Returns: array
, r, g, b, a
Parameters
options: obj
Returns: array
, r, g, b, a
Parameters
options: obj
Returns: array
, r, g, b, a
Convert an RGB tuplet to HSL
Parameters
r: int
, Red component [0-255]
g: int
, Green component [0-255]
b: int
, Blue component [0-255]
Returns: obj
, HSL (object {h, s, l})
Convert an HSL tuplet to RGB
Parameters
h: int
, Hue component [0-1]
s: int
, Saturation component [0-1]
l: int
, Lightness component [0-1]
Returns: obj
, RGB (object {r, g, b})
Convert a hue to an RGB component
Parameters
p: int
, Convert a hue to an RGB component
q: int
, Convert a hue to an RGB component
t: int
, Convert a hue to an RGB component
Returns: int
, p
1D Gaussian function
Parameters
x: float
, 1D Gaussian function
mu: float
, 1D Gaussian function
sigma: float
, 1D Gaussian function
Returns: float
, gaussian