Exemple #1
0
        protected override ImageJpeg DoInBackground()
        {
            ImageJpeg image = new ImageJpeg();

            if (Config.Filter.Equals("Red Ton"))
            {
                var task = new Task[] { PhotoUtilities.LoadPhotoTask(Config.Size, Config.Image) };
                Task.WaitAll(task);
                task = new Task[] { PhotoUtilities.LoadFilterTask(Config.Filter) };
                Task.WaitAll(task);

                image.ImageJpg  = PhotoUtilities.ImageJpg;
                image.FilterJpg = PhotoUtilities.FilterJpg;
            }
            else
            {
                var task = new Task[] { PhotoUtilities.LoadPhotoTask(Config.Size, Config.Image) };
                Task.WaitAll(task);
                image.ImageJpg = PhotoUtilities.ImageJpg;
            }
            return(image);
        }
Exemple #2
0
            protected override void Run()
            {
                var loadTask = new Task[] { PhotoUtilities.LoadPhotoTask(size, name) };

                Task.WaitAll(loadTask);
            }