Exemplo n.º 1
0
        static void Main(string[] args)
        {
            //Must be SAVED as a png, can be loaded FROM any format!
            SteganographicImage stegoImage = new SteganographicImage(new Bitmap(Image.FromFile("Image.png")));
            stegoImage.EncodeImage(Encoding.UTF8.GetBytes("Secret Message")).Save("NewImage.png");

            //Decoding, load from png
            stegoImage = new SteganographicImage(new Bitmap(Image.FromFile("NewImage.png")));
            Console.WriteLine(stegoImage.DecodeImage());
        }
Exemplo n.º 2
0
        static void Main()
        {
            //Must be SAVED as a png, can be loaded FROM any format!
            SteganographicImage stegoImage = new SteganographicImage(new Bitmap(Image.FromFile("TestImages/Image.png")));
            var encodedimage = stegoImage.EncodeImage(Encoding.UTF8.GetBytes("Secret Message"));

            encodedimage.Save("TestImages/NewImage.png");

            //Decoding, load from png
            stegoImage = new SteganographicImage(new Bitmap(Image.FromFile("TestImages/NewImage.png")));
            string decoded = Encoding.UTF8.GetString(stegoImage.DecodeImage());

            Console.WriteLine(decoded);
        }