private void edgeDetectBtn_Click(object sender, EventArgs e) { if (Program.IsPathValid(Program.currentDir)) { EffectsUtils.EdgeDetectDir(); } }
private void haloBtn_Click(object sender, EventArgs e) { int radMin = haloRadiusMin.GetInt(); int radMax = radMin; if (!String.IsNullOrWhiteSpace(haloRadiusMax.Text.Trim())) { radMax = haloRadiusMax.GetInt(); } EffectsUtils.HaloDir(radMin, radMax); }
public static void MedianPreview() { Program.mainForm.SetMedianVars(); FileInfo firstImg = IOUtils.GetFiles()[0]; string tempImgPath = Path.Combine(Paths.GetDataPath(), "medianpreview" + firstImg.Extension); if (File.Exists(tempImgPath)) { File.Delete(tempImgPath); } File.Copy(firstImg.FullName, tempImgPath); EffectsUtils.Median(tempImgPath, medianRadiusMin, medianRadiusMax); Program.PreviewImage(tempImgPath); }
public static void BlurPreview() { Program.mainForm.SetBlurVars(); FileInfo firstImg = IOUtils.GetFiles()[0]; string tempImgPath = Path.Combine(IOUtils.GetAppDataDir(), "blurpreview" + firstImg.Extension); if (File.Exists(tempImgPath)) { File.Delete(tempImgPath); } File.Copy(firstImg.FullName, tempImgPath); EffectsUtils.Blur(tempImgPath, blurRadiusMin, blurRadiusMax); Program.mainForm.PreviewImage(tempImgPath); }
public static void NoisePreview() { Program.mainForm.SetNoiseVars(); FileInfo firstImg = IOUtils.GetFiles()[0]; string tempImgPath = Path.Combine(Paths.GetDataPath(), "noisepreview" + firstImg.Extension); if (File.Exists(tempImgPath)) { File.Delete(tempImgPath); } File.Copy(firstImg.FullName, tempImgPath); Random rand = new Random(); EffectsUtils.AddNoise(tempImgPath, GetNoiseTypeList(), attenMin, attenMax, monochrome); Program.PreviewImage(tempImgPath); }
public static void BlurApply() { Program.mainForm.SetBlurVars(); EffectsUtils.BlurDir(blurRadiusMin, blurRadiusMax); }
public static void NoiseApply() { Program.mainForm.SetNoiseVars(); EffectsUtils.AddNoiseDir(GetNoiseTypeList(), attenMin, attenMax, monochrome); }
public static void MedianApply() { Program.mainForm.SetMedianVars(); EffectsUtils.MedianDir(medianRadiusMin, medianRadiusMax); }