Image rescaling quality


#1

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 ?

 

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;

};

#2

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?


#3

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