DO12 - New DPI-scaling and iconsizes

Please shortly explain what I have to keep in mind when creating icons now for DO. Then:

Q1: What sizes should be used to support all sizes up to 4K?
Q2: 22x22 always was "non-standard-size" - shouldn't that be replaced by 24x24 now?

This is how we are doing the internal icon sets, in large and small sizes.


There are 4 versions of the icons in total (4 bitmaps), and at different DPIs the different bitmaps are selected (and sometimes scaled) for the "large" and "small" sizes.

The XML is set so that no bitmap scaling is done for any DPI between 100% and 175% DPI. That's because scaling smaller bitmaps looks ugly, so we felt it better to 'snap' to the nearest size at those DPIs.

At exactly 200% DPI there is also no bitmap scaling, since there are bitmaps specifically for that size (48x48 and 64x64).

At exactly 300% DPI, there's no scaling for the small bitmap (64x64 is used as-is), while the large bitmap will be scaled (also based on the 64x64 image, since it is the largest we have).

At every other DPI (176% and above, excluding 200% and 300%): Images are scaled from the closest size match. That generally works well as at those higher DPIs the source bitmaps have enough pixels that they will scale really well without producing horrible results. You can barely tell they have been scaled (and anyone using non-integer DPIs will be used to a bit of scaling anyway, as the entire OS is doing it to almost everything).

Note that the bitmap scaling is tailored to icons, so if you have an icon set with only 100% DPI images on a 200% DPI screen, and the XML does not specify otherwise, then the bitmap will be pixel-doubled rather than filtered/blurred. Pixel doubling generally looks better for icons, and is also what the OS will do for legacy applications at 200% DPI, but obviously only works for integer multiples of the base size.

22x22 remains the size for "small" icons at 100% DPI. At 200% DPI, you can see we're using 48x48 (i.e. twice the size of 24x24).

Thanks for explanation.

So I have to create 4 bitmaps in future... uff.

You don't have to. Opus can scale whatever is there to other sizes.

Yes, but as said in another thread... at the moment you mentioned your 4K-monitor, I started creating 64x64 icons (and only kept the unfinished set as template, as I'd like to redesign most of them). And then waited for future changes, which was... DO12. :slight_smile:

Normally you won't use 64x64, except you have eagle-eyes or a monitor larger than 32'' to work with 4K at 100%. On the other side I think about another size between 36x36 and 42x42 - on my UWDH at 125% 32x32 is bit too small and 48x48 too large. But that wouldn't met Windows-Standard. What do you think?

Make whatever you want. :slight_smile:

It might be worth setting up the XML to scale what you have already and see how it looks. You might find it looks better than expected. (We ran with scaled icons ourselves for months during development.) Of course, it might look terrible as well, but if it looks good it can save you some time.

No scaling, unfortunately I like perfectionism. :slight_smile: