I am drawing some images in a grid. The images are saved as 16x16px pngs.
However, I later decided to up the size of the grid to 32x32px.
When I use the following code:
graphics.DrawImage(image, Xdraw, Ydraw, 32, 32);
where image is an Image loaded from a png, and Xdraw and Ydraw are the top left corner decided somewhere above.
The image is slightly blurry as .DrawImage uses bicubic(or some other smoothing function) to upscale the image. I would like it to turn the smoothing off, so I can preserve the hard edges.
Is this possible?
I think you should change InterpolationMode
property of your graphics. Aslo take a look into SmoothingMode
and CompositingQuality
of Graphics class.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With