# Is there a way to set the graphics resampling quality without having to override the paint() method?

**URL:** https://forum.juce.com/t/is-there-a-way-to-set-the-graphics-resampling-quality-without-having-to-override-the-paint-method/55787
**Category:** General JUCE discussion
**Created:** [April 13, 2023, 10:07pm UTC](https://forum.juce.com/t/is-there-a-way-to-set-the-graphics-resampling-quality-without-having-to-override-the-paint-method/55787 "2023-04-13T22:07:25Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![TrustedSteed](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/trustedsteed/32/13862_2.png) [@TrustedSteed](https://forum.juce.com/u/TrustedSteed)
#### Post date: [April 13, 2023, 10:07pm UTC](https://forum.juce.com/t/is-there-a-way-to-set-the-graphics-resampling-quality-without-having-to-override-the-paint-method/55787/1 "2023-04-13T22:07:25Z")

</div>

I’ve got a button on the UI, and I’m resizing it.  
Is there anyway I can .set this particular button graphic to scaled at `highResamplingQuality`?  
Or am I forced to override its `paint()` and implement that manually?

(also, I assume `setBounds` triggers the `paint()` method)

---

<div class="post-metadata">

### Author: ![asimilon](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/asimilon/32/4235_2.png) [@asimilon](https://forum.juce.com/u/asimilon)
#### Post date: [April 14, 2023, 1:19pm UTC](https://forum.juce.com/t/is-there-a-way-to-set-the-graphics-resampling-quality-without-having-to-override-the-paint-method/55787/2 "2023-04-14T13:19:17Z")

</div>

Some more context would be helpful.

Can only guess that you might be using `ImageButton`?

And again can only guess that you’re using Windows?

If both those are true then the answer is, yes, you will need to override the paint method, further more you will have to use some other method to rescale the image as by design Windows image scaling is garbage.

> [@Difference in quality of scaling image on windows and mac](https://forum.juce.com/t/difference-in-quality-of-scaling-image-on-windows-and-mac/43115):
>
> Hi, wondering if there’s anything I can do to improve Windows, which looks like this: and Mac which looks like this: i.e. much smoother, even though both running on high res screens (4k for windows, retina for mac) any suggestions welcome, thx

> [@Difference between macOS and Windows image scaling, is it normal?](https://forum.juce.com/t/difference-between-macos-and-windows-image-scaling-is-it-normal/35218):
>
> Hi, I develop my plugins on macOS, where they look great, but I’ve noticed the images look a bit crap on Windows frowning macOS: [image] Windows: [image] 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?

---

<div class="post-metadata">

### Author: ![TrustedSteed](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/trustedsteed/32/13862_2.png) [@TrustedSteed](https://forum.juce.com/u/TrustedSteed)
#### Post date: [April 14, 2023, 2:56pm UTC](https://forum.juce.com/t/is-there-a-way-to-set-the-graphics-resampling-quality-without-having-to-override-the-paint-method/55787/3 "2023-04-14T14:56:34Z")

</div>

Yes to ImageButton and Windows!  
I’ll look at those links - thanks for providing them.

(Also, a **font** I just imported looks poor. I don’t suppose there are any tricks for fonts are there? )

---

<div class="post-metadata">

### Author: ![alexrodi](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@alexrodi](https://forum.juce.com/u/alexrodi)
#### Post date: [March 22, 2024, 4:18pm UTC](https://forum.juce.com/t/is-there-a-way-to-set-the-graphics-resampling-quality-without-having-to-override-the-paint-method/55787/4 "2024-03-22T16:18:37Z")

</div>

That’s an age-old question! I found [this](https://qr.ae/psKGTr) answer particularly useful
