I don't even know how to explain this one... :/
... Some days ago, I caught a cold, and I have been staying at home for some days now.
But today I was felling really drowsy, sick and bored as hell, so I made this little good for nothing WTF program! It opens an image file and goes through it, pixel by pixel, outputting the pixels as colorized characters... (Weird stuff)
But at least it made me feel a little better :)
Sample Source:
int y = 0;
int Counter = 0;
for (int i = 0; i <>
{
if (i == Bitmap.Width)
{
i = 0;
y += 1;
ImageOutputASText.SelectedText = "n";
if (Counter > Bitmap.Width * Bitmap.Height - 1)
{
MessageBox.Show("Reached the end");
return;
}
}
BitmapContents.SelectionStart = BitmapContents.TextLength;
BitmapContents.SelectionColor = Bitmap.GetPixel(i, y);
BitmapContents.SelectedText = txtOutputchar.Text;
BitmapContents.SelectionColor = Bitmap.GetPixel(i, y);
Counter += 1;
}
Mirror 1
Channel9 Post
Back to Home

No comments:
Post a Comment
Note: Only a member of this blog may post a comment.