diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1746e32 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +bin +obj diff --git a/Program.cs b/Program.cs index 470e2d1..536f37a 100644 --- a/Program.cs +++ b/Program.cs @@ -10,7 +10,7 @@ namespace kot if (args.Length < 1) { Console.WriteLine("missing input argument, pass \'help\' for more info"); - System.Environment.Exit(0); + System.Environment.Exit(-1); } if (args[0] == "help") { @@ -23,7 +23,17 @@ input argument /must/ be of types: {jpg, jpeg, bmp,}"); string final = ""; string[] scale = {".",",",":",";","+","*","?","%","S","#","@"}; //Array.Reverse(scale); - var f = new Bitmap(path); + Bitmap f; + try + { + f = new Bitmap(path); + } + catch + { + Console.WriteLine("bad path"); + System.Environment.Exit(-1); + } + f = new Bitmap(path); for (int i = 0; i < f.Height; i += 30) { for (int z = 0; z < f.Width; z += 30)