-
-
Save key-moon/b2d210e9fc8548f3fa1da1e089f95b88 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 (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