Beispiel #1
0
        private static void doWork()
        {
            var processor = new PhotoProcessor();
            var filters   = new PhotoFilters();

            PhotoProcessor.PhotoProcessorHandler photoProcessor = filters.ResizePhoto;

            //PhotoProcessorDelMain pd = new PhotoProcessorDelMain(filters.AdjustColour);

            processor.Process("photo.jpg", photoProcessor);
            Console.ReadLine();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            var photoFilters   = new PhotoFilters();
            var photoProcessor = new PhotoProcessor();

            PhotoProcessor.PhotoProcessorHandler filterHandler = photoFilters.ApplyBrightness;
            filterHandler += photoFilters.Resize;
            filterHandler += photoFilters.ApplyContrast;
            filterHandler += RemoveRedEyes;
            photoProcessor.Process("photo.jpg", filterHandler);

            Console.WriteLine();
            Action <Photo> filterHandlerAction = photoFilters.ApplyBrightness;

            filterHandlerAction += photoFilters.Resize;
            filterHandlerAction += photoFilters.ApplyContrast;
            filterHandlerAction += RemoveRedEyes;
            photoProcessor.Process("photo2.jpg", filterHandlerAction);
        }