When you resize an image down to a very small size, it looks very blocky when you scale the pixels back up individually.

original Starry Night scaled-down Starry Night

In extreme cases, as above, you can no longer reconstruct the original image, as too much information has been lost. Your task is to build a program that will imagine what the original, unscaled image might have looked like in extreme cases such as this one, where the picture has been reduced to a simple palette.

Your program will take an uncompressed bitmap image with three 8-bit RGB channels (with maximum dimensions 16 pixels on each side), and output a second image that produces the original image when scaled down using an average filter (equivalent to GIMP's "Linear" option).

The output image should have the same aspect ratio as the original and have an exact multiple of pixels, to make average-filtering easier. It should also be at least 50 times the size of the original image on each dimension.

closed as too broad by Mego, trichoplax, Pavel, Dennis Jan 9 '17 at 2:23

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    What's stopping me from upscaling the input image 50 times? – Pavel Jan 9 '17 at 1:38
  • Personally, I like this idea, but my opinion is admittedly not representative of the community. Hopefully this doesn't get closed before I come up with something neat. – Patrick Roberts Jan 9 '17 at 1:39
  • @Pavel nothing. But I wouldn't upvote an answer that did that. – Patrick Roberts Jan 9 '17 at 1:40
  • 5
    This appears to be "do simple task in a creative way". That makes it likely to be considered too broad. – trichoplax Jan 9 '17 at 2:03
  • 2
    This question also lacks a validity criterion, and I agree with @trichoplax 's point. Also you did not specify how you get from the high res image to the low res one. Next time please read the tag description and post your challenge in the sandbox as advised here. – flawr Jan 9 '17 at 13:05