Ejemplo n.º 1
0
 static void Main(string[] args)
 {
     try {
         if (args.Length == 4)
         {
             bool   Run    = Convert.ToBoolean(args[3]);
             Bitmap Source = null;
             if (Run)
             {
                 Source = ImgF.ImageSmaller(new Bitmap(args[0]));
             }
             else
             {
                 Source = new Bitmap(args[0]);
             }
             Source.Save(args[1], ImgF.ChooseImageFormat(args[2]));
             Environment.Exit(0);
         }
         else
         {
             Environment.Exit(1);
         }
     } catch {
         Environment.Exit(2);
     }
 }
Ejemplo n.º 2
0
 static void Main(string[] args)
 {
     try {
         if (args.Length >= 3)
         {
             Bitmap Source = new Bitmap(args[0]);
             Bitmap Result = ImgF.Grayscale(Source);
             Result.Save(args[1], ImgF.ChooseImageFormat(args[2]));
             Environment.Exit(0);
         }
         else
         {
             Environment.Exit(1);
         }
     } catch {
         Environment.Exit(2);
     }
 }
Ejemplo n.º 3
0
 static void Main(string[] args)
 {
     try {
         if (args.Length >= 4)
         {
             HColor HC     = (HColor)(Convert.ToInt32(args[3]));
             Bitmap Source = new Bitmap(args[0]);
             Bitmap Result = ImgF.Threecolorimg(Source, HC);
             Result.Save(args[1], ImgF.ChooseImageFormat(args[2]));
             Environment.Exit(0);
         }
         else
         {
             Environment.Exit(1);
         }
     } catch {
         Environment.Exit(2);
     }
 }
Ejemplo n.º 4
0
 static void Main(string[] args)
 {
     try {
         if (args.Length >= 3)
         {
             Bitmap Source = new Bitmap(args[0]);
             Bitmap Result = ImgF.Imagereverse(Source);
             Result.Save(args[1], ImgF.ChooseImageFormat(args[2]));
             Environment.Exit(0);
         }
         else
         {
             Environment.Exit(1);
         }
     } catch (Exception ex) {
         Console.WriteLine(ex.ToString());
         Environment.Exit(2);
     }
 }
Ejemplo n.º 5
0
 static void Main(string[] args)
 {
     try {
         if (args.Length >= 4)
         {
             double D0     = Convert.ToDouble(args[3]);
             Bitmap Source = new Bitmap(args[0]);
             Bitmap Result = ImgF.Gaussianpass(Source, D0, GaussianPass.Low, BinaryImage.False);
             Result.Save(args[1], ImgF.ChooseImageFormat(args[2]));
             Environment.Exit(0);
         }
         else
         {
             Environment.Exit(1);
         }
     } catch (Exception ex) {
         Console.WriteLine(ex.ToString());
         Environment.Exit(2);
     }
 }
Ejemplo n.º 6
0
 static void Main(string[] args)
 {
     try {
         if (args.Length >= 4)
         {
             int Range = Convert.ToInt32(args[3]);
             if (Range % 2 == 0)
             {
                 Environment.Exit(1);
             }
             Bitmap Source = new Bitmap(args[0]);
             Bitmap Result = ImgF.Medianfilter(Source, Range);
             Result.Save(args[1], ImgF.ChooseImageFormat(args[2]));
             Environment.Exit(0);
         }
         else
         {
             Environment.Exit(1);
         }
     } catch {
         Environment.Exit(2);
     }
 }