Reputation: 7949
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!
Upvotes: 3
Views: 685
Reputation: 1187
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
.
Upvotes: 2