Log on
Main page Graphics Photography Audio Video Tools Web Design Documents Space & Astro Amiga Funny Surreal Gallery Links & Contact

ImageMagick downscaling algorithms


When working with ImageMagick, you can use the -filter option to specify which kind of filtering you want. Here are the types of filtering possible:

Point

point.png
Box

box.png
Triangle

triangle.png
Hermite

hermite.png
Hanning

hanning.png
Hamming

hamming.png
Blackman

blackman.png
Gaussian

gaussian.png
Quadratic

quadratic.png
Cubic

cubic.png
Catrom

catrom.png
Mitchell

mitchell.png
Lanczos (default)

lanczos.png
Bessel

bessel.png
Sinc

sinc.png


Now I will try to run all the scaling methods mentioned on ImageMagick's documentation page to see what they look like. I'm scaling them up by a factor of 1.62857 for the worst possible result.

-filter Hanning
-filter Triangle
-filter Quadratic
-filter Point
-filter Hermite
-filter Box
the original
-filter Kaiser
-filter Catrom
-filter Cubic
-filter Lanczos
-filter Hamming
-filter Welsh
-filter Parzen
-filter Blackman
-filter Bohman
-filter Mitchell
-filter Bartlett
-filter Gaussian


As you see the default choice gives a very sharp and well-defined nice downscaling of the original. Definately a good choice. It would be nice to know more about what the different algoritms are good at though, as the difference between all of them is not entirely obvious.
When i get the time i will expand this test with examples of up-scaling to further investigate and display the nature of the different algorithms. See also the browser scaling page on more general info about different scaling algorithms.

Website by Joachim Michaelis