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
path: root/Apps
diff options
context:
space:
mode:
authorr4dius <r4dius@gmail.com>2017-10-08 23:11:34 +0300
committerr4dius <r4dius@gmail.com>2017-10-08 23:11:34 +0300
commitb03543956aa2a0bde12892762ac8636c517129db (patch)
tree610f0a5d4637d581da11c737500cac5b8047a331 /Apps
parentafb1d8a8b5fde2e4d49ad9c42e29d64f65074718 (diff)
Fix small image resizing quality
Not much :)
Diffstat (limited to 'Apps')
-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);
}