Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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