1.0.18 • Published 11 months ago

@4bitlabs/resize-filters v1.0.18

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

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

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

11 months 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

1 year ago

1.0.11

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.10

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.0.0

1 year ago