Created
June 18, 2014 00:28
-
-
Save phrohdoh/d3b0fd5f803e3275b8ec 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
var image = new Bitmap(100, 100, PixelFormat.Format24bppRgb); | |
using (var locked = image.Lock()) unsafe | |
{ | |
for (var x = 0; x < image.Width; x++) | |
for (var y = 0; y < image.Height; y++) | |
if (y == image.Height / 3) | |
image.SetPixel(x, y, Color.FromArgb(70, 0, 0)); | |
} | |
using (var graphics = new Graphics(image)) | |
{ | |
graphics.DrawImage(image, 100, 100); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment