It is common to provide several image sizes with applications; anything from 16x16 to 256x256 and 512x512 for HiDPI monitors.

Is there a reason why we need to provide all of them? Can we not supply say a 256x256 and then downsize it?

  • 1
    @rwong What is the relevance of the link to my question? – John Kouraklis Nov 30 '16 at 0:09
  • Guys, how is it unclear what I am asking? What is unclear? – John Kouraklis Nov 30 '16 at 0:10
  • The unclear part of your question that you did not tell what problem you are trying to solve. What kind of application do you have in mind, are you targeting different screen resolutions, different screen sizes, mobile vs desktop machines etc., and if your application needs to have a "zoomed" display. If you write an application for a restricted range of resolutions/screen sizes the answer may be simply "no, there is no reason to provide different image sizes, just pick the most common one". See also XY-problem – Doc Brown Dec 1 '16 at 6:27
  • 1
    @DocBrown Thanks for the explanation. I am familiar with the XY problem but I still don't see your point. If you read my question, it indeed starts from the solution BECAUSE I don't understand the problem. In other words, I start from the observation and what I am asking is what problem is solving. – John Kouraklis Dec 1 '16 at 22:02

Assuming that you're describing multi-resolution icon files, they exist because

  1. You can optimize each image resolution independently to be most aesthetically pleasing at that particular resolution, something that an image reducer cannot do well, and
  2. You don't have to use an image reducer, which can be costly if you're converting hundreds of these things on-the-fly to display in an explorer window.
| improve this answer | |

You can't do it (in a trivial way) by downsizing. Esp. small icons sometimes have a different rendering that can only be created by a human to resemble the large image. That's why you need to create all of them manually (though you might personally create them just by downsizing the large one).

In order to get any intermediate size the OS then will scale from that icon template which has the nearest size. E.g. for a 50x50 you would upscale the 16x16 while for a 150x150 you would likely downscale the 256x256. Not sure where to set the switching point in a concrete case, but OS vendors probably have some heuristics implemented here, so the above numbers are to be taken with a grain of salt (see also the comments by @DocBrown).

| improve this answer | |
  • @DocBrown Aww. Read my words "resemble the large image". If you like Dali, fine. You can recognize a skewed watch as such. But you want it to look like something nice. Not just as "something". – qwerty_so Nov 30 '16 at 21:42
  • @DocBrown Yes, it isn't. But you are quite picky too ;-) – qwerty_so Nov 30 '16 at 22:57
  • @DocBrown That would be probably the way to do it by scaling the nearest size. I will elaborate on the answer. – qwerty_so Dec 1 '16 at 9:32
  • Well, I gave you now an upvote, though I think there are two flaws in your answer. First, I think you should replace "often" by "sometimes". Second, to my experience, downscaling gives almost always better results than upscaling, even if the "nearest available size" is the smaller sized image. If you have doubts, take an image resizer like IrfanView and make some tests on your own. – Doc Brown Dec 2 '16 at 6:30
  • @DocBrown I made some adjustments to the answer. – qwerty_so Dec 2 '16 at 9:29

There is no easy answer to your question because it's too open. Whether resizing or using multiple images is going to depend on many things.

  • What does your software do?
  • Who or what uses it?
  • Is resizing practical or performant?
  • Can your image resize well without manual intervention?
  • What is the usage of the resized images?
  • etc, etc.
| improve this answer | |

For many images and use cases, downsizing with a good resample algorithm can bring you all the quality you need. Downsizing from a bigger size to a smaller one works better in general than upsizing from a smaller to a bigger one, since it is easier to remove existing information from an image than to reconstruct missing information out of thin air.

However, for many images, the quality might not please you, maybe important details get lost when scaling down to 16x16, or the performance hit of downscaling or the memory impact of caching those images after downscaling might be so big it will not be acceptable.

The only way to find out is to try it out for yourself, for your use case. You can start by taking the particular image in the resolution you have, use an image resizer program for the downscaling and check what happens when you just downscale from 256x256 to 16x16. Of course, you should try to let the image resizer use the same or at least a similar algorithm than the one available in your application framework.

| improve this answer | |

There are quality problems when you rely on resizing from a single size. At high resolution, you can afford to put details to an image that just look bad when you scale the image down, so you add a low resolution image that doesn't have that detail in the first place.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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