Esempio n. 1
0
        private void encodeBtn_Click(object sender, EventArgs e)
        {
            ImageMap iMap = new ImageMap(image);

            bool result = iMap.encode(messageBox.Text, passBox.Text.GetHashCode());

            if (result == false)
            {
                MessageBox.Show("Sorry, you need to use a larger image or a smaller message.");
                return;
            }

            Bitmap newImage = iMap.getBitmap();

            EncodedImageWindow newWindow = new EncodedImageWindow(newImage);
            newWindow.Show();
        }
Esempio n. 2
0
        private void decodeBtn_Click(object sender, EventArgs e)
        {
            ImageMap iMap = new ImageMap(image);

            messageBox.Text = iMap.decode(passBox.Text.GetHashCode());
        }