1.0.18 • Published 1 year ago
@4bitlabs/resize-filters v1.0.18
@4bitlabs/resize-filters

A collection of pixel resize filters for rendering Sierra On-line SCI-engine assets.
Nearest-Neighbor
import { nearestNeighbor } from '@4bitlabs/image';
// scale up the image by 3x both horizontally and vertically
const output = nearestNeighbor([3, 3])(source);
Scale2×
Scale the source ImageData
using the Scale2× algorithm.
import { scale2x } from '@4bitlabs/image';
// scale the using the Scale2× algorithm
const output = scale2x(source);
Scale3×
Scale the source ImageData
using the Scale3× algorithm.
import { scale3x } from '@4bitlabs/image';
// scale the image using the Scale3× algorithm
const output = scale3x([3, 3])(source);
Scale5×6
A variant of the Scale3× algorithm, but scales each pixel to 5×6 block. This incidentally matches the pixel aspect-ratio
of CGA/EGA (1.2
) graphics when displayed on modern LCD-displays with a 1∶1 pixel aspect-ratio.
import { scale5x6 } from '@4bitlabs/image';
const output = scale5x6(source);
1.0.18
1 year ago
1.0.17
1 year ago
1.0.16
1 year ago
1.0.15
1 year ago
1.0.14
1 year ago
1.0.13
1 year ago
1.0.12
2 years ago
1.0.11
2 years ago
1.0.9
2 years ago
1.0.8
2 years ago
1.0.10
2 years ago
1.0.6
2 years ago
1.0.5
2 years ago
1.0.4
2 years ago
1.0.3
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago
0.0.0
2 years ago