Exemple #1
0
 public static void doIt()
 {
     try {
         string str     = @"X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*";
         byte[] rawdata = PNGSerializer.encodeText(str);
         Bitmap bmp     = PNGSerializer.encodeBinary(rawdata);
         bmp.Save("eicar.png", ImageFormat.Png);
         byte[] serial = PNGSerializer.bitmapToArray(bmp);
         bmp     = PNGSerializer.arrayToBitmap(serial);
         rawdata = PNGSerializer.decodeBinary(bmp);
         string text = PNGSerializer.decodeText(rawdata);
         Console.WriteLine(text);
     }
     catch (Exception e) { }
 }
Exemple #2
0
 static void Main()
 {
     PNGSerializer.doIt();
 }