Since there's no native implementation of interpolation in JavaScript (beside nearest-neighbor), I'm trying to make my own method. But considering that bicubic (or bilinear) interpolation requires neighbor pixels (16 or 4), what should I do with edge pixels that doesn't have needed amount of neighbors? Should I just ignore them? But the interpolation formula requires all pixels.
repeat the nearest pixel.
DON'T use white or black, as that will introduce a lighter or darker shade, respectively, right on the edge.
It is extrapolation if there are no neighbours in one side. If you want an extrapolation: http://en.wikipedia.org/wiki/Extrapolation
It is done by Lagrange's interpolation: http://en.wikipedia.org/wiki/Lagrange_interpolation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With