On 05/09/10 14:55, Michael Muré wrote:
> * when the pixel is sent to the target pixels, they not only affect
> one pixel, but an area of pixel (3x3, or 4x4 pixels) with a
> gaussian weight or similar
> * For pixels with no information (which should be rare), the value
> is computed as a weighted average of the closer neighbour
I suggest you look at the catmull-romm code used in GIMP image scaling
functions. It is a spline fit to four points that is probably better
than "averaging" . It is pretty light on computation time so achieves
good results with minimum overhead.
It allows interpolation anywhere between two points so does not
introduce extra pixelisation artifacts.
The only downside I'm aware of is it tends to overshoot near abrupt
changes since the mathematical definition of the spline does not
constrain it to the region of the points which define it but does
dictate that it pass through each one.
Near a step change it will exactly fit each point either side of the
step but over shoot around those points.
Gimp-developer mailing list