Documentation: Lighten

Description

This action lightens or darkens the image.

Demo

Amount:

Example usage

var img = new Image();
img.onload = function() {
	Pixastic.process(img, "lighten", {amount:0.5});
}
document.body.appendChild(img);
img.src = "myimage.jpg";

Parameters

  • amount (float)
    The strength of the lighten/darken effect. A value between -1 and 1, where positive values lighten the image and negative values darken the image.

Known issues

  • Applying this effect more than once in IE doesn't give the expected result.

View source: lighten.js

Browser support