[Mono-list] Mono image scaling quality

Daniel Lo Nigro lists at dan.cx
Sat Aug 10 11:50:39 UTC 2013


Hi everyone,

I've written some code to generate thumbnails for an image listing. The
thumbnails look good on Windows but are significantly lower quality when
the same code is ran on Mono. I have a feeling Mono may be using linear
interpolation even though I'm explicitly saying to use high quality bicubic.

Here's a screenshot showing the difference. Output from Mono is on the left
and MS.NET on the right: http://ss.dan.cx/2013/08/10-21.36.39.png

Here's the relevant code:

var thumb = new Bitmap(width, height);
using (var graphics = Graphics.FromImage(thumb))
{
graphics.CompositingQuality = CompositingQuality.HighQuality;
graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
graphics.CompositingMode = CompositingMode.SourceCopy;
graphics.DrawImage(sourceImg, 0, 0, width, height);
}
return thumb;

Any ideas? Should I just defer thumbnail creation to something like
ImageMagick/GraphicsMagick or are there some other options I can set in
Mono to make it produce higher-quality output?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20130810/62245e5c/attachment.html>


More information about the Mono-list mailing list