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); } }
public static void OpenImageEffects() { string filePath = ImageHelpers.OpenImageFileDialog(); if (!string.IsNullOrEmpty(filePath)) { Image img = ImageHelpers.LoadImage(filePath); ImageEffectsForm form = new ImageEffectsForm(img); form.EditorMode(); form.Show(); } }