What is the best scaling algorithm? You choose!

Generating a favicon for all platforms is a lot a matter of resizing a big picture to smaller sizes. Submit a 1000×1000 picture to RealFaviconGenerator and it will scale it to 16×16, 32×32, 152×152… and many other dimensions.

At first, I was pleased by the Mitchell algorithm. This is the default algorithm of ImageMagick, the tool used by RFG to perform image manipulation. A few weeks ago, Mazyad Alabduljaleel, an iOS developer, submitted his own picture and the result was not that great.

The Mitchell algorithm tends to blur the original image in order to smooth the edges. This is usually a good thing and thus makes Mitchell a good default choice. However, Mazyad’s picture was a pixel art design, where angles are a desired feature. And RFG does its best to lessen them. Oops!

Nearest Neighbor was the right solution for this picture. Different images, different scaling algorithms.

What is the best scaling algorithm? It depends.
What is the best scaling algorithm? It depends.

RFG does not pretend to know the right answer anymore. Although it still offers Mitchell by default, you can now pick the algorithm that fits your picture best. That was issue31.

You picture, your choice
You picture, your choice

ImageMagick offers something like 40 algorithms. I did by best to select the most relevant ones in order to not overwhelm the regular user with too many choices. However, I may have overlooked important ones. Please drop a comment whenever you feel something is missing.

What’s next? Vector graphics support and maybe vectorization of bitmap pictures for better scaling results.

4 thoughts on “What is the best scaling algorithm? You choose!

Leave a Reply

Your email address will not be published. Required fields are marked *