Log on
Main page Graphics Photography Music & Audio Audio Plugins 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 Box
-filter Kaiser
-filter Cubic
-filter Triangle
-filter Catrom
-filter Quadratic
-filter Welsh
the original
-filter Hamming
-filter Mitchell
-filter Hanning
-filter Parzen
-filter Hermite
-filter Lanczos
-filter Point
-filter Bartlett
-filter Blackman
-filter Bohman
-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