Created
July 3, 2018 19:59
-
-
Save felipebaltazar/077a90c3403af443058ff835eb68177f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using (var newImage = new Bitmap(width:wid, height:hei)) | |
{ | |
using(Graphics g = Graphics.FromImage(newImage)) | |
{ | |
var imageWidth = this.RayTracerView?.Size.Width ?? 64; | |
var imageHeight = this.RayTracerView?.Size.Height ?? 64; | |
g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.High; | |
g.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality; | |
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; | |
g.CopyFromScreen(new Point(X, Y),Point.Empty, new Size(wid, hei)); | |
AdjustContrast(newImage,20); | |
slide = new Bitmap(newImage, new Size(imageWidth, imageHeight)); | |
slide.SetResolution(600,600); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment