Sign up ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

This is something I've been wondering about for a while - are there any algorithms out there to scale pixel art down?

I'm sure we all know about the upscale versions on the Wikipedia page on Image Scaling.

I would have thought something like nearest neighbour resampling to get the colour pattern right, and then redrawing the outline, or high-contrast areas, over the top. Is there anything out there or am I going to have to learn how to do this myself?


share|improve this question

migrated from Dec 9 '11 at 1:34

This question came from our site for professional and enthusiast programmers.

Do you want this to work well for any image sizes and scale factors, or factors of 2 only? – Job Dec 9 '11 at 2:01
I am not an expert on the topic, but I think the article on Wikipedia about Supersampling might point you in the right direction. This would be the general approach I would use, in your case. – Daniel B Dec 9 '11 at 8:41

2 Answers 2

This process is known as "downscaling". There are many algorithms for this. Which is appropriate will depend on many factors, such as performance requirements and the nature of the images you are scaling.

See e.g. for further information.

share|improve this answer

While you can use Supersampling to downsize, you'll quickly notice that you receive "averaged grey stuff". Human perception is based on edge contrasts and patterns and exactly those are lost with naiive "averaging".

Perfect downsampling would need "semantic" knowledge of the object properties. In other words: which properties are important to "attenuate" in down-sampled image to preserve perception of the object. Artists do this intuitively!

Amongst lower-tech methods you could try: Lanczos filter or B-splines. These filters preserve some of the sharpness. But there are tons of other filters that may work depending on type and relative sizes of the features in your images.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.