Difference between None, Linear, Cubic and Sinc(Lanczos3) interpolation in image scaling?

48

16

While scaling images in GIMP in the Quality section I was prompted to choose one of the following interpolations:

  • None
  • Linear
  • Cubic
  • Sinc(Lanczos3)

What is the difference between these and which one is the best in terms of quality/loselessness?

Bleeding Fingers

Posted 2014-01-17T21:53:48.710

Reputation: 351

Answers

34

These four options define how to scale the image. Each option describes an algorithm used to do this. See image sampling.

None: The nearest-neighbor algorithm is used. There is no smoothing after scaling.
Linear: Touching pixels average their values.
Cubic: Touching pixels average their values so central pixels maintain the most value.
Lanczos: Pixels are passed into an algorithm that averages their color/alpha using sinc functions (similar to sine interpolation, somewhat like cubic).

None of these algorithms are directly superior, as the links describe. Instead, it would be better to list the situations in which you'd most like to use one over the other:

None (nearest-neighbor): Use when you want absolutely no sampling (blurring) of the image.

Linear: Use when you have very small text; cubic interpolation is usually better otherwise. This produces blurred, but jagged, edges.

Cubic: Use for most images. Unless the image is very small or incredibly detailed, cubic and bicubic interpolation helps keep edges smooth. According to Wikipedia, it can sometimes increase perceived contrast or cause artifacts.

Lanczos: This interpolation method is much like cubic except that instead of blurring, it creates a "ringing" pattern. The benefit is that it can handle detailed graphics without blurring like the cubic filters.

I prefer nearest-neighbor for pixel art, linear or lanczos for small text, and cubic for everything else. These choices are subjective and by no means the 'proper' usages for the algorithms.

person27

Posted 2014-01-17T21:53:48.710

Reputation: 695

1lanczos windowed sinc is clearly superior in most cases. But it may not be optimal to have a 3pixel wide lanczos filter. It may cause a bit of ringing tough.joojaa 2014-12-24T15:36:32.590

I think the nearest-neighbor is actually objectively the proper one (or at least significantly objectively better than Linear, Cubic, and Lanczos) for pixel art.JamesTheAwesomeDude 2016-01-03T20:07:43.633