Difference between macOS and Windows image scaling, is it normal?


I develop my plugins on macOS, where they look great, but I’ve noticed the images look a bit crap on Windows :frowning:


Both captured on a 4k screen, built with JUCE 5.4.4

Windows is set to 150%, but setting it to 100% gives the same bad aliasing effect.

Is there any way to fix this?

If you can get hold of the graphics context, maybe you can set the resampling quality to high:
setImageResamplingQuality (highResamplingQuality);

I haven’t found a place, where you can set it as general default though…

1 Like

I did try that in case it was that Windows was defaulting to the low quality (docs say that default is medium).
Those screen shots are with that call being made to set to high on Windows (on macOS it’s the default).
Additionally if I understood the docs correctly, the change between medium and high would only make a difference when upscaling, these are all downscaled images.

I found this behaviour as well in Windows, the only way forwards for me was to go back to my designer and have everything reworked into SVG.

Yeah, if you’re using the software renderer on Windows then the image rescaling is designed to be fast rather than pretty, I’m afraid. It may or may not look better if you use the GL renderer - in that case the result will depend on how the GL driver resamples. On OSX the CoreGraphics image rescaling is quite good.

But given the example image you posted, you really shouldn’t be using bitmaps for that! It’s a perfect example of something that would work much better as vector graphics.


Yeah, I’m sure it would, but I don’t have the skills to create vector graphics, Photoshop is waaaay easier for me :wink: I guess in 10 years time I’ll be there :joy:

Tried that, and at least for my GPU makes no difference :frowning:

AVIR is a high quality image resizing algorithm you can use, and then it’ll be the same on both platforms: https://github.com/avaneev/avir Uses SSE so it’s decently quick.

I have it wrapped up in a juce module, you can get it here: https://github.com/FigBug/Gin/blob/master/modules/gin/images/imageeffects.h

Call gin::applyResize()


Awesome, I should have paid a bit more attention as used the HSL adjustment code from your library (properly credited of course!) already in my plugins, I suppose I would also need to add the AVIR notice too? (license stuff I find a little bit confusing)

Yes, in his license file he specifies:

Please credit the author of this library in your documentation in the
following way: “AVIR image resizing algorithm designed by Aleksey Vaneev”

1 Like

Hi. Link is out of date. Is there an updated link? thx

Link is here:

I’ve noticed with the latest versions of XCode that there are missing intrinsics for the ARM target, does anyone have an idea how to solve this problem? My solution thus far is to not include AVIR in Mac builds and only use it for scaling images for Windows and Linux.

hi, sorry, don’t understand - what are the intrinsics?

SSE instructions, it’s this include that causes issue, because of course there are no SSE instructions on ARM.

ah, i see. i guess as this is not really needed for Mac, can optionally compile?

AVIR has both SSE and straight C++ versions. You should be able to wrap the SSE version in a JUCE_INTEL #ifdef

1 Like