stretchToFit without interpolation?

i noticed Image::RectanglePlacement::stretchToFit automatically interpolates. can i turn that off somehow or can you add a little bool parameter that lets us turn it off pls? :>

So how exactly would you expect a stretching of an image without interpolation to work? :thinking: If it’s about your fancy plugin background you shared some days ago, you could also just store all the properties of the random generated values and re-draw the image to a resized image in case a resizing happened…

i wanna be able to draw much smaller images and then scale them up, so i can use more complex post processing effects on my images without draining the cpu too much. effectively: pixelart.
so when i scale up the images from something like 12x12 i don’t want it to become all blurry and stuff.

setImageResamplingQuality() should do the trick, using the lowest quality, which is nearest neighbour.

that method is linked from drawImageWithin() which I presume you’re using given the mention of Image::RectanglePlacement::stretchToFit

1 Like

almost, yes. i use drawImage. setImageResamplingQuality() does the trick, yes :slight_smile: thxxx. i already wrote my own upscale method for images but it looks much neater to just tell the Graphics-object to do it