A collection of blur-filters for rendering Sierra On-line SCI-engine assets.
Full documentation for the library can be found here.
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
|
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.