Esempio n. 1
0
 private void edgeDetectBtn_Click(object sender, EventArgs e)
 {
     if (Program.IsPathValid(Program.currentDir))
     {
         EffectsUtils.EdgeDetectDir();
     }
 }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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);
        }
Esempio n. 5
0
        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);
        }
Esempio n. 6
0
 public static void BlurApply()
 {
     Program.mainForm.SetBlurVars();
     EffectsUtils.BlurDir(blurRadiusMin, blurRadiusMax);
 }
Esempio n. 7
0
 public static void NoiseApply()
 {
     Program.mainForm.SetNoiseVars();
     EffectsUtils.AddNoiseDir(GetNoiseTypeList(), attenMin, attenMax, monochrome);
 }
Esempio n. 8
0
 public static void MedianApply()
 {
     Program.mainForm.SetMedianVars();
     EffectsUtils.MedianDir(medianRadiusMin, medianRadiusMax);
 }