private void btnCreateStegoImage_Click(object sender, EventArgs e) { try { stego = Transform((Bitmap)coverImage.Image, (Bitmap)secretImage.Image); stegoImage.Image = stego; btnExtractSecretImage.Enabled = true; btnSaveStegoImage.Enabled = true; CreateStegoTb.SendToBack(); StegoTb.SendToBack(); SaveStegoTb.SendToBack(); } catch (Exception) { MessageBox.Show("An Error Occured", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnUploadStegoImage_Click(object sender, EventArgs e) { try { OpenFileDialog ofile = new OpenFileDialog(); ofile.Filter = "PNG files(*.png)|*.png|Jpg files(*.jpg)|*.jpg| All Files(*.*)|*.*"; if (ofile.ShowDialog() == System.Windows.Forms.DialogResult.OK) { stegoImageLocation = ofile.FileName; stego = new Bitmap(stegoImageLocation); stegoImage.Image = stego; btnExtractSecretImage.Enabled = true; CreateStegoTb.SendToBack(); StegoTb.SendToBack(); SaveStegoTb.SendToBack(); } } catch (Exception) { MessageBox.Show("An Error Occured", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }