Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
using System;
using System.Linq;
using System.Drawing;
namespace CrackTheCode
{
class MainClass
{
public static void Main (string[] args)
{
var txt = System.IO.File.ReadAllText ("../../SETI_message.txt");
Console.WriteLine (txt.Length);
var n = 359;
using (var img = new Bitmap (n, 5300)) {
for (var i = 0; i < txt.Length; i++) {
var c = txt [i] - '0';
//Console.WriteLine (c);
img.SetPixel (i % n, i / n, c == 0 ? Color.White : Color.Black);
}
img.Save ("output.png", System.Drawing.Imaging.ImageFormat.Png);
img.Dispose ();
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.