What is the proper way to draw images on retina displays? The apple instructions say to name the file @2 and it will do some "magic". However, we can't really do that with BinaryData. What's the equivalent? Just scale the image in half? Will that actually do anything?
i have actually the same issue. i have all the 2x images but i cannot draw them in retina taking into account the scale.
i mean, if i specify 2x dimensions then 2x bitmaps will be drawn on a 2x window size. if i specify 1x dimensions then 2x bitmaps will be scaled down by drawImage to a 1x window size. First case i have doubled window size, second case the image are scaled down by juce before blitting (resulting in a correct window size, but the image is software scaled taking into account juce::ResamplingQuality and doesn't take advantage of higher density and looks blurry).
are there are guidelines on drawing images for retina taking into account the descktop scale factor ? all things that i'm trying do produce different results.
I know, it is an old thread, but I am wondering the same. Did you find an answer?
The scale factor is available in the Graphics object or by getting the display info from the Desktop class.
Personally I'd suggest just using higher-resolution images and not worrying about lower DPIs, everything should look fine when scaled down.
Ah, right. The scale factor. Thanks. That should do it.
About scaling: The scaling down in the JUCE-OpgenGl renderer is not as good as scaling down in Photoshop. So you can see scaling artifacts. Therefore using a large icon on a non-retina display can look choppy sometimes. In the attached screenshot you can see what I mean.