View Single Post
Old 9th January 2003, 02:13   #4  |  Link
Evil Andy
Registered User
 
Join Date: Nov 2002
Location: Cheshire, England
Posts: 76
K, I'm a little pickled so I don't know how coherent this will be...

Let us consider a picture being resized down by an arbitrary amount. Therefore each pixel in the final picture will be equivalent to several pixels or part of pixels from the starting picture.

Nearest neighbour is the fastest algorithm because it chooses the pixel that would be closest to the original, spatially, if you scale up or scale down an image with no reference to the colour of the surrounding pixels e.g. if you have 9 pixels arranged thus

1 2 3
4 5 6
7 8 9

and you scaled the image down to a third of its size then the resultant pixel would be the same colour as pixel 5 regardless of the surrounding pixels.

Bilinear takes all the source pixels that make up the new pixel and gives a weighted average of their colour to find the final colour. It does this in a linear way ie. a pixel twice as far away has half the weight, a pixel four times as far away has a quarter the weight etc. so a graph of proximity versus weight gives a straight or linear line.

Bicubic is the slowest algorithm as pixels have exponentially more weight the closer they are to the nearest neighbour pixel so a graph of proximity versus weight gives a curved line.

And that all seems to make sense after 7 pints. Stand by for an edit in the morning when I realise I'm talking total rubbish

Last edited by Evil Andy; 9th January 2003 at 03:29.
Evil Andy is offline   Reply With Quote