Esempio n. 1
0
        private void _fotoworker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            try
            {
                string dir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "tmpimg.jpg");
                //   string dirWM = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "tmpimgWM.Bmp");
                Bitmap img = imgCamUser.Image.Bitmap;
                Bitmap wm  = new Bitmap("Resources\\WM.png");
                // img.Save(dir);
                //  WatermarkImage(dir, "Centro Multimedia @", dirWM, ImageFormat.Bmp);
                DrawWatermark(wm, img, 10, 10);
                fotocapt.Image = img;
                img.Save(dir, ImageFormat.Jpeg);
                this.dir          = dir;
                foto.Enabled      = true;
                compartir.Enabled = true;

                // Process.Start(dir);
            }
            catch (Exception ee)
            {
                FormStuffs.ShowMensaje(@"Ha ocurrido un problema mientras se tomaba la foto.Intente mas tarde." + '\n' + ee.Message);
            }
            foto.Enabled   = true;
            Capt.StopRecon = false;
        }
Esempio n. 2
0
 private void radButton1_Click(object sender, EventArgs e)
 {
     try
     {
         string dir = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "tmpimg.Bmp");
         //   string dirWM = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "tmpimgWM.Bmp");
         Bitmap img = picbox.Image.Bitmap;
         Bitmap wm  = new Bitmap("Resources\\WM.png");
         // img.Save(dir);
         //  WatermarkImage(dir, "Centro Multimedia @", dirWM, ImageFormat.Bmp);
         DrawWatermark(wm, img, 10, 10);
         img.Save(dir);
         Process.Start(dir);
     }
     catch (Exception ee) {
         FormStuffs.ShowMensaje(@"Ha ocurrido un problema mientras se tomaba la foto.Intente mas tarde." + '\n' + ee.Message);
     }
 }