# canvas-levels-filter

> Module ffor applying a level filter effect to a canvas

Latest version **1.0.0** (published 2017-01-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install canvas-levels-filter
pnpm add canvas-levels-filter
yarn add canvas-levels-filter
bun add canvas-levels-filter
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-01-22 |
| First published | 2017-01-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Hernan Torrisi |
| Maintainers | airnan |

## Links

- npm: https://www.npmjs.com/package/canvas-levels-filter
- Repository: https://github.com/bodymovin/canvas-levels-filter
- Homepage: https://github.com/bodymovin/canvas-levels-filter#readme
- Issues: https://github.com/bodymovin/canvas-levels-filter/issues
- npm.io page: https://npm.io/package/canvas-levels-filter

## Dependencies (1)

- [levels-filter](https://npm.io/package/levels-filter.md) ^1.0.0

## Recent versions

- 1.0.0 (latest) — 2017-01-22

## README

# canvas-levels-filter
A module for applying a level filter effect to a canvas

### Usage  

`var canvasLevels = require('canvas-levels-filter');
var canvasLevelsInstance = svgLevels();
levelsInstance.setLevelValues({
	inputBlack: 0,
    inputWhite: 127,
    gamma: 1,
    outputBlack: 127,
    outputWhite: 255
})
levelsInstance.canvas = canvas;
var svgFilter = levelsInstance.compose();

### Properties  
* inputBlack
* outputBlack
* gamma
* outputBlack
* inputBlack
* color: the color channel
* values: an object with one or more of the previous properties
* filter: you can pass your own filter element


### Methods  

* setLevelValues: accepts an object with one or more of the level properties
* compose: applies the filter to the specified canvas
* resetCanvasData: restore the canvas image to it's original image

---
_Source: https://npm.io/package/canvas-levels-filter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
