Image Resampled using Adobe bicubic

Image Resampled using ResizeIT Lanczos256

Home

Interpolation Types

© 2003 Brian Spangler

Interpolation Types
About the different Interpolation types offered by ResizeIT
 




 

 
None This option utilizes simple pixel replicate and eliminate to render the output image.
Nearest Neighbor This interpolation type uses neighboring pixel values as input to an average for the output pixel
Bilinear A step above Nearest Neighbor that uses a weighted set of pixels in calculating the output pixel
Cubic Polynomial Interpolation A two dimensional interpolation with an additional variable that provides a range of 0 thru 200 for edge enhancement The default is 75. The lower the number the less edge enhancement, the higher the number the greater the edge enhancement.
Cubic Spline Interpolation Resizes images via techniques involving use of points on a curve. The more points there are the smoother the curve. In this implementation ResizeIT offers variations of 16, 36 and 64 pixels as points on a curve.
Lanczos Windowed Sinc Function sinc (based on sin function) filters are used to separate one band of frequencies from another. A windowed number of pixels dictates how many source pixels will be used to produce a destination pixel.

Windowed
 
2 (2*2)^2 = 16 source pixels to 1 destination pixel
4 (4*2)^2 = 64 source pixels to 1 destination pixel
8 (8*2)^2 = 256 source pixels to 1 destination pixel
16  (16*2)^2 = 1024 source pixels to 1 destination pixel
32 (32*2)^2 = 4096 source pixels to 1 destination pixel

*For the most part you can use Windowed 64 since only those images with the finest of details may require Windowed 1024 or more. The lower the number of source pixels to destination pixels the faster the interpolation time.

 

ResizeIT's own Cubic and Linear These two are simply bicubic and bilinear that I have tweaked over the years. The key difference is a filter the image runs through that helps limit jaggies on high contrast images.

 

 

Types I use
These are just recommendations since ultimately it comes down to the type of machine you have. I'll be the first to admit that this is not some of the fastest code out there; as time allows I'll optimize the code further without compromising the current quality you can get from these interpolations.

I mostly take photos of birds and stay with Spline64 at increments 4 and also Sinc64 with increments 2 or more. If I have time to kill then I’ll go with Sinc256 or more in 2 or 3 increments.
For portraits of people I like to use Spline64 or bicubic with edge enhancement of 75 and 4 increments.
For images with high contrasty areas (like a butterfly antenna against a white flower, thanx E.J.) I use ResizeIT's own bicubic in two increments.