kanata
v0.3.0
Published
A modern library for image processing on web with pure typescript.
Downloads
11
Maintainers
Readme
kanata
A modern library for image processing on web with pure typescript.
Note: This library is not completed, but some operations are already done.
Demo
You can check the live demo here.
Install
npm install kanata
Usage
// new image
const image = new kanata.ImageCore();
// load image
image.fromURL / image.fromElement / image.fromBuffer...;
// apply operations
kanata.grayscale()(image);
// or
image.apply(kanata.grayscale());
// or
image.pipe(kanata.grayscale()).pipe(kanata.colorInvert());
image.exec();
Completed
Core
- ImageCore
Point operations
- grayscale
- bitsCut
- ColorInvert
- colorSpaceConvert
- contrastStretch
- gammaTransform
- globalThreshold
- grayLayered
- linearTransform
- logTransform
- mask
Geometry operations
- affineTransform
- crop
- flip
- rotate
- scale
- skew
- translate
Local filters
- convolutionFilter
- meanFilter
- rankFilter
- localThreshold
- morphologicalFilter
Histogram
Utils
- changeRegion
- clone
Features
- Documents
- Unit tests.
- Benchmarks.
- A faster version with webassembly.