npm.io
2.0.1 • Published 7h ago

@4bitlabs/blur-filters

Licence
ISC
Version
2.0.1
Deps
2
Size
33 kB
Vulns
0
Weekly
0
Stars
3

@4bitlabs/blur-filters License NPM Version NPM Downloads

A collection of blur-filters for rendering Sierra On-line SCI-engine assets.

Documentation

Full documentation for the library can be found here.

Filters

Method Description
gaussBlur(sigma: number): ImageFilter Applies a gaussian blur to the image in-place
hBlur(sigma: number): ImageFilter Applies a gaussian blur, only on the horizontal axis
boxBlur(s: number): ImageFilter Applies a fast box-blur of box s
hBoxBlur(s: number): ImageFilter Applies a fast horizontal box-blur of length s
Example:
import { BlurFilters } from '@4bitlabs/image';

// Blur the image using a horizontal box, with a box of 3-pixels
const filter = BlurFilters.hBoxBlur(3);
const output = filter(source);

Note: These are very naïve implementations, and should not be used in any kind of production environment.