Skip to content

Instantly share code, notes, and snippets.

@key-moon
Created Sep 8, 2018
Embed
What would you like to do?
using (StreamWriter writer = new StreamWriter(out))
{
Image image = Image.FromFile("alpha.png");
Bitmap bitmap = new Bitmap(image);
var size = bitmap.Size;
for (int i = 0; i < size.Width; i++)
{
for (int j = 0; j < size.Height; j++)
{
var pixel = bitmap.GetPixel(i, j);
writer.Write(pixel.A == 253 ? "" : "");
}
writer.WriteLine();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment