image-filter-gamma
Small library to apply a gamma transformation to a image relying on image-filter-core
handle the transformation and distribute work with webworkers.
Other related modules:
- image-filter-core
- image-filter-contrast
- image-filter-grayscale
- image-filter-threshold
- image-filter-sepia
- image-filter-invert
- image-filter-gamma
- image-filter-colorize
- image-filters
Install
npm install image-filter-gamma --save
Usage
It applies a gamma transformation to a base64 image. If you want a more complete library, please check image-filters that wraps this and other libraries to provide a more complete suite of image filters.
This library consumes ImageData and outputs ImageData in a Promise. You can use image-filter-core
to convert from ImageData to dataURL.
JS file:
var imageGamma = ; ;
Frequent questions:
How can I get image data from a image tag?
var element = document;var canvas = document;var context = canvas;context;var imageData = context;
How can I get image data from url?
var element = document;element;//...repeat process from the previous answer
How can I use the output of this?
var imageFilterCore = ; ;