# image-filters

> Small image filters library

Latest version **1.0.1** (published 2017-01-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install image-filters
pnpm add image-filters
yarn add image-filters
bun add image-filters
```

## 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.1 |
| Published | 2017-01-09 |
| First published | 2016-03-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | canastro |
| Keywords | image, filter, filters, processing, manipulation, transformation, pixel |

## Links

- npm: https://www.npmjs.com/package/image-filters
- npm.io page: https://npm.io/package/image-filters

## Dependencies (10)

- [image-filter-core](https://npm.io/package/image-filter-core.md) ^2.0.0
- [image-filter-color](https://npm.io/package/image-filter-color.md) ^1.0.0
- [image-filter-gamma](https://npm.io/package/image-filter-gamma.md) ^1.0.0
- [image-filter-sepia](https://npm.io/package/image-filter-sepia.md) ^1.0.0
- [image-filter-invert](https://npm.io/package/image-filter-invert.md) ^1.0.0
- [image-filter-colorize](https://npm.io/package/image-filter-colorize.md) ^1.0.0
- [image-filter-contrast](https://npm.io/package/image-filter-contrast.md) ^1.0.0
- [image-filter-grayscale](https://npm.io/package/image-filter-grayscale.md) ^1.0.0
- [image-filter-threshold](https://npm.io/package/image-filter-threshold.md) ^2.0.0
- [image-filter-brightness](https://npm.io/package/image-filter-brightness.md) ^1.0.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2017-01-09
- 0.0.6 — 2017-01-03
- 0.0.5 — 2016-03-13
- 0.0.4 — 2016-03-13
- 0.0.3 — 2016-03-13
- 0.0.2 — 2016-03-05
- 0.0.1 — 2016-03-05

## README

![build status](https://travis-ci.org/canastro/image-filters.svg?branch=master)
[![npm version](https://badge.fury.io/js/image-filters.svg)](https://badge.fury.io/js/image-filters)
[![codecov](https://codecov.io/gh/canastro/image-filters/branch/master/graph/badge.svg)](https://codecov.io/gh/canastro/image-filters)

# image-filters

Small library to apply a transformations to a image relying on `image-filter-core` handle the transformation and distribute work with webworkers.

This library is wrapper around the following smaller libraries:
* [image-filter-brightness](https://www.npmjs.com/package/image-filter-brightness)
* [image-filter-color](https://www.npmjs.com/package/image-filter-color)
* [image-filter-colorize](https://www.npmjs.com/package/image-filter-colorize)
* [image-filter-contrast](https://www.npmjs.com/package/image-filter-contrast)
* [image-filter-gamma](https://www.npmjs.com/package/image-filter-gamma)
* [image-filters](https://www.npmjs.com/package/image-filters)
* [image-filter-invert](https://www.npmjs.com/package/image-filter-invert)
* [image-filter-sepia](https://www.npmjs.com/package/image-filter-sepia)
* [image-filter-threshold](https://www.npmjs.com/package/image-filter-threshold)

So if you want to use only one or two of these filters you might be better of just including them directly.

## Install

```
npm install image-filters --save
```

## Usage
At the moment there are three ways of usage, img element, imageData or url:
### Initialization:
```js
var imageFilter = require('image-filters');

// from a image element
var elementOne = new ImageFilter({ from: '#original' }, nWorkers);

// from image data
var elementTwo = new ImageFilter({ imageData: imageData }, nWorkers);

// from url
var elementThree = new ImageFilter({ url: "http://lorempixel.com/400/200" }, nWorkers);
```

### Apply filters:

```js
imageFilter
    .contrast({ contrast: 50 })
    .brightness({ adjustment: 50 });
```

### Get results:
Every transformation will return as imageData, but you have the possibility to get the result appended to the DOM.

```js
//append to html
imageFilter.append('#target');
```

## Development
To run the samples in this module please run `npm run build && npm run serve` and then access `http://127.0.0.1:8080/simple/` or `http://127.0.0.1:8080/editor/`

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