public bool Process(string command, string[] args) { if (args.Length < 2) { Console.WriteLine("Invalid arguments, see --help"); return(false); } var fI = new FileInfo(args[1]); var fO = new FileInfo(args[2]); if (!fI.Exists) { Console.WriteLine("Input file not found"); return(false); } var file = new GrblFile(0, 0, 200, 300); file.LoadImportedSVG(fI.FullName, false); file.SaveProgram(fO.FullName, true, true, false, 1); Console.WriteLine("Conversion finished"); return(true); }
private void processFile(string input, string output) { var file = new GrblFile(0, 0, 200, 300); ImageProcessor IP = new ImageProcessor(file, input, Size.Empty, false); IP.WhiteClip = 5; IP.Brightness = 100; IP.Contrast = 100; IP.Quality = 3; IP.FillingQuality = 3; IP.BorderSpeed = 1000; IP.LaserOff = "M5"; IP.LaserOn = "M3"; IP.MarkSpeed = 1000; IP.MaxPower = 1000; IP.GenerateGCodeSync(); file.SaveProgram(output, true, true, false, 1); }