# Image rescaling quality

**URL:** <https://forum.juce.com/t/image-rescaling-quality/13206>\
**Category:** Windows\
**Created:** [July 19, 2014, 11:42am UTC](https://forum.juce.com/t/image-rescaling-quality/13206 "2014-07-19T11:42:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![onqel](https://avatars.discourse-cdn.com/v4/letter/o/91b2a8/32.png) [@onqel](https://forum.juce.com/u/onqel)\
**Post date:** [July 19, 2014, 11:42am UTC](https://forum.juce.com/t/image-rescaling-quality/13206/1 "2014-07-19T11:42:34Z")

</div>

I just noticed there's a massive difference in image rescaling quality between OS X and Windows,

I've tried setting ImageResamplingQuality high but no luck, any tips on how can I improve this ?

![](https://dl.dropboxusercontent.com/u/1369729/tmp/osx.png) ![](https://dl.dropboxusercontent.com/u/1369729/tmp/win.png)

&nbsp;

```
class CustomMenuComponent : public PopupMenu::CustomComponent

{

public:

    CustomMenuComponent()

    {

        logo = loadgfx(ResBottomBar::tsea_logo_png, ResBottomBar::tsea_logo_pngSize);

    }

    void getIdealSize (int& idealWidth, int& idealHeight) override

    {

        // tells the menu how big we'd like to be..

        idealWidth = 200;

        idealHeight = 20;

    }

    void paint (juce::Graphics& g) override

    {

        float w = getWidth();

        float h = getHeight();

        g.setColour ( Colours::black.withAlpha(0.95f));

        g.setImageResamplingQuality(Graphics::highResamplingQuality);

        g.drawImageWithin (logo,

                           w*0.2, h*0.2, w*0.6, h*0.7,

                           RectanglePlacement::centred,

                           false);

    }

private:

    Image logo;

};
```

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [July 19, 2014, 11:44am UTC](https://forum.juce.com/t/image-rescaling-quality/13206/2 "2014-07-19T11:44:58Z")

</div>

Why use an image there, when an SVG or other vector format would be more appropriate, and would look better than either of those versions?

---

<div class="post-metadata">

**Author:** ![onqel](https://avatars.discourse-cdn.com/v4/letter/o/91b2a8/32.png) [@onqel](https://forum.juce.com/u/onqel)\
**Post date:** [July 19, 2014, 11:53am UTC](https://forum.juce.com/t/image-rescaling-quality/13206/3 "2014-07-19T11:53:10Z")

</div>

Those formats are new to me to be honest, but I will check it out :) thanks !
