パッケージの詳細

sampling

mattdesl16MIT1.0.1

linear and nearest-neighbour sampling utility

sample, sampling, bilinear, linear

readme

Experimental package. Sampling functions for image and noise manipulation.

Currently all samples wrap around edges.

e.g.

var bilinear = require('sampling').bilinear;
var nearest = require('sampling').nearest;

//returns the bilinear float
var N = bilinear(data, width, height, x, y);

//nearest neighbour sample
var v = nearest(data, width, height, x, y);