I have a big image in good quality (for my needs), i need resize to small size (30 x 30px), I resize it with graphic.DrawImage. But when i resize it become blurred and little lighter.
also I have try CompositingQuality and InterpolationMode, but it all was bad.
Example, that quality i'm trying get.
My result
Edited
Image of icon i draw myself, maybe it will be better draw it small without resizing?
Edit2
Resizeing code:
Bitmap tbmp;
//drawing all my features in tbmp with graphics
bmp = new Bitmap(width + 5, height + 5);
bmp.MakeTransparent(Color.Black);
using (var gg = Graphics.FromImage(bmp))
{
gg.CompositingQuality = CompositingQuality.HighQuality;
// gg.SmoothingMode = SmoothingMode.HighQuality;
gg.InterpolationMode = InterpolationMode.HighQualityBicubic;
gg.DrawImage(tbmp, new Rectangle(0, 0, width, height), new Rectangle(GXMin, GYMin, GXMax + 20, GYMax + 20), GraphicsUnit.Pixel);
gg.Dispose();
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…