Beispiel #1
0
        private void Process_Click(object sender, EventArgs e)
        {
            if (files != null)
            {
                Regex regex      = new Regex("\\\\[^\\\\]+jpg");
                int   splitIndex = regex.Match((string)files[0]).Index;
                Directory.CreateDirectory(((string)files[0]).Substring(0, splitIndex) + "/process");
                foreach (string fileName in files)
                {
                    splitIndex = regex.Match(fileName).Index;
                    var   dir      = (fileName).Substring(0, splitIndex);
                    var   fileOnly = (fileName).Substring(splitIndex + 1);
                    Image image    = Image.FromFile(fileName);
                    IEnumerable <ImgFunc> funcs = funcListBox.Items.Cast <ImgFunc>();
                    foreach (ImgFunc func in funcs)
                    {
                        image = func.Apply(image);
                    }

                    image.Save(dir + "/process/" + fileOnly);
                }

                MyDialog.ShowMessageBox("이미지 변환 완료", "이미지 변환을 완료하였습니다.");
                return;
            }
            MyDialog.ShowMessageBox("이미지를 찾을 수 없습니다.", "이미지를 찾을 수 없습니다.");
        }
Beispiel #2
0
        public skewFunc()
        {
            string rangeStr = "";

            MyDialog.ShowInputBox("Skew 각도 입력", "각도", ref rangeStr);
            range       = int.Parse(rangeStr);
            this.random = new Random();
        }
Beispiel #3
0
        public blurFunc()
        {
            string rangeStr = "";

            MyDialog.ShowInputBox("Blur Kernal Size", "Kernal Size Range 입력 (3 이상)", ref rangeStr);
            range       = int.Parse(rangeStr);
            this.random = new Random();
        }
Beispiel #4
0
        public PerspectiveFunc()
        {
            string rangeStr = "";

            MyDialog.ShowInputBox("Perspective range", "Perspective 픽셀범위 입력", ref rangeStr);
            range       = int.Parse(rangeStr);
            this.random = new Random();
        }