Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/hakchi2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Apps/NesMiniApplication.cs11
1 files changed, 9 insertions, 2 deletions
diff --git a/Apps/NesMiniApplication.cs b/Apps/NesMiniApplication.cs
index 24d953f4..289b7307 100644
--- a/Apps/NesMiniApplication.cs
+++ b/Apps/NesMiniApplication.cs
@@ -406,9 +406,16 @@ namespace com.clusterrr.hakchi_gui
gr.Flush();
outImage.Save(IconPath, ImageFormat.Png);
gr = Graphics.FromImage(outImageSmall);
+
+ // Better resizing quality (more blur like original files)
+ gr.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
gr.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
- gr.DrawImage(outImage, new Rectangle(0, 0, outImageSmall.Width, outImageSmall.Height),
- new Rectangle(0, 0, outImage.Width, outImage.Height), GraphicsUnit.Pixel);
+ // Fix first line and column alpha shit
+ using (ImageAttributes wrapMode = new ImageAttributes())
+ {
+ wrapMode.SetWrapMode(System.Drawing.Drawing2D.WrapMode.TileFlipXY);
+ gr.DrawImage(outImage, new Rectangle(0, 0, outImageSmall.Width, outImageSmall.Height), 0, 0, outImage.Width, outImage.Height, GraphicsUnit.Pixel, wrapMode);
+ }
gr.Flush();
outImageSmall.Save(SmallIconPath, ImageFormat.Png);
}