Beispiel #1
0
        /// <summary>
        /// Apply steganography
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnRun_Click(object sender, EventArgs e)
        {
            btnRun.Enabled = false;

            try
            {
                Bitmap result = steganolizer.ExecuteHide();

                string filename = (!string.IsNullOrEmpty(tbFilename.Text)) ? tbFilename.Text : DEFAULT_SAVE_FILENAME;
                result.Save(saveDestPath + "\\" + filename + ".jpg");

                Alerter.Info("Work done !" + Environment.NewLine + "Image saved at : " + saveDestPath);
            }
            catch (SourceImageWidthGreaterThanHost ex)
            {
                Alerter.Error(ex.Message);
            }
            catch (SourceImageHeightGreaterThanHost ex)
            {
                Alerter.Error(ex.Message);
            } finally
            {
                btnRun.Enabled = true;
            }
        }
Beispiel #2
0
        /// <summary>
        /// Find image into image
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnRunDetection_Click(object sender, EventArgs e)
        {
            // tbDetectSaveFilename.Text - save filename
            btnRunDetection.Enabled = false;

            try
            {
                Bitmap result = steganolizer.ExecuteFind();

                string filename = (!string.IsNullOrEmpty(tbDetectSaveFilename.Text)) ? tbDetectSaveFilename.Text : DEFAULT_SAVE_FILENAME;
                result.Save(tbSavePathDetect.Text + "\\" + filename + ".jpg");

                Alerter.Info("Work done !" + Environment.NewLine + "Image saved at : " + saveDestPath);
            }
            catch (Exception ex)
            {
                Alerter.Error(ex.Message);
            }
            finally
            {
                btnRunDetection.Enabled = true;
            }
        }