Given the following code:
var target = new Bitmap(source.Size.Width / 2, source.Size.Height / 2);
using (var g = Graphics.FromImage(target))
{
g.DrawImage(source, new Rectangle(Point.Empty, target.Size));
g.Save();
return target;
}
What scaling method does 'DrawImage' use? Is it an average of 4 pixels? The value at {0,0)? Can I adjust this behaviour?
Thanks!
You can set the value of the Graphics.InterpolationMode property to the interpolation method that you want to use. This must be done before you call DrawImage.
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