JavaScript Image Processing Library

grafi.js is a library intended for learning about how image processing works. Each modules are intentionally kept small and users are encouraged to read the source code to learn about different methods and algorithms. In result, grafi may not be the most performant or the most sophisticated image processing library, but that's the point.

Made by @kosamari. Code on github.

Projects Using grafi.js

shift - faux tilt shift

fokus - simple way to create focused image

Samples

Invert

grafi.invert(img)

Brightness (50% bright)

grafi.brightness(img, {level: 127})

Brightness (50% dark)

grafi.brightness(img, {level: -127})

Contrast

grafi.contrast(img, {level: 2})

Posterize

grafi.posterize(img, {level: 4})

Solarize

grafi.solarize(img)

Grayscale

grafi.grayscale(img, {mode: 'luma'})

Threshold (50%)

grafi.threshold(img, {level: 127})

Pseudocolor

grafi.pseudocolor(img)

Blur

grafi.blur(img)

Sharp

grafi.sharpen(img)