lena-ts
TypeScript icon, indicating that this package has built-in type declarations

0.1.21 • Public • Published

fork from lena.js

lena.js

Rewrite with ts, and add some functions

lena-ts

Tiny library for image processing.

Install via NPM

npm install lena-ts --save

Install via yarn

yarn add lena-ts

pipe

Support string list, you can use this function in WebWorker

import { FilterList, pipe, red, invert, brightness } from '../src';
const filterList: FilterList = [red, invert, [brightness, 10]];

// also work~
const filterListStr: FilterList = ['red', 'invert', ['brightness', 10]];

const imageData = pipe(document.createElement('canvas'), filterList);

Run demo

yarn demo

Current filters

  • Canny
  • Gaussian
  • Grayscale
  • Highpass
  • Invert
  • Laplacian
  • Mirror
  • Noise
  • Prewitt
  • RGB
  • Roberts
  • Saturation
  • Sepia
  • Sharpen
  • Sobel
  • Thresholding
  • Lowpass 3x3
  • Lowpass 5x5

License

Code is under MIT license

Package Sidebar

Install

npm i lena-ts

Weekly Downloads

12

Version

0.1.21

License

MIT

Unpacked Size

216 kB

Total Files

92

Last publish

Collaborators

  • ahaoboy