Mono Ignores Graphics.InterpolationMode?

Posted by Timothy Baldridge on Stack Overflow See other posts from Stack Overflow or by Timothy Baldridge
Published on 2010-04-21T17:20:20Z Indexed on 2010/04/21 17:23 UTC
Read the original article Hit count: 218

Filed under:
|
|

I have a program that draws some vector graphics using System.Drawing and the Graphics class. The anti-aliasing works, kindof okay, but for my need I neede oversampling, so I create the starting image to be n times larger and then scale back the final image by n. On Window and .NET the resulting image looks great! However, on Mono 2.4.2.3 (Ubuntu 9.10 stock install), the intropolation is horrible. Here's how I'm scaling my images:

Bitmap bmp = new Bitmap(Bmp.Width / OverSampling, Bmp.Height / OverSampling);
Graphics g = Graphics.FromImage(bmp);
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
g.DrawImage(Bmp, 0, 0, bmp.Width, bmp.Height);
g.Dispose();

From what I can tell there is no interpolation happening at all. Any ideas?

© Stack Overflow or respective owner

Related posts about mono

Related posts about c#