Esempio n. 1
0
        static async Task Main(string[] args)
        {
            string sourcePath      = Path.Combine(Environment.CurrentDirectory, "images");
            string destinationPath = Path.Combine(Environment.CurrentDirectory, "output");;

            ImageProcess imageProcess = new ImageProcess();

            imageProcess.Clean(destinationPath);

            Stopwatch sw = new Stopwatch();

            sw.Start();
            //imageProcess.ResizeImages(sourcePath, destinationPath, 2.0);
            await imageProcess.AsyncResizeImages(sourcePath, destinationPath, 2.0);

            sw.Stop();

            Console.WriteLine($"花費時間: {sw.ElapsedMilliseconds} ms");
            Console.WriteLine("Key Anything To Exist");
            Console.ReadKey();
        }