Ejemplo n.º 1
0
        public static Image AddImageEffects(Image img, TaskSettings taskSettings)
        {
            if (taskSettings.ImageSettings.ShowImageEffectsWindowAfterCapture)
            {
                using (ImageEffectsForm imageEffectsForm = new ImageEffectsForm(img, taskSettings.ImageSettings.ImageEffects))
                {
                    if (imageEffectsForm.ShowDialog() == DialogResult.OK)
                    {
                        taskSettings.ImageSettings.ImageEffects = imageEffectsForm.Effects;
                    }
                }
            }

            using (img)
            {
                return ImageEffectManager.ApplyEffects(img, taskSettings.ImageSettings.ImageEffects);
            }
        }
Ejemplo n.º 2
0
 public static void OpenImageEffects()
 {
     string filePath = ImageHelpers.OpenImageFileDialog();
     Image img = null;
     if (!string.IsNullOrEmpty(filePath))
     {
         img = ImageHelpers.LoadImage(filePath);
     }
     ImageEffectsForm form = new ImageEffectsForm(img);
     form.EditorMode();
     form.Show();
 }