Esempio n. 1
0
        public static bool FilterGrayscale(Bitmap bitmap)
        {
            HWFilter hwFilter = new HWFilter(bitmap);

            GrayscaleFilter gsFilter = new GrayscaleFilter();

            hwFilter.AddFilter(gsFilter);
            return(hwFilter.ApplyFilters());
        }
Esempio n. 2
0
        public static Bitmap FilterGSGamma(Bitmap bitmap, GammaConfig gamma)
        {
            HWFilter hwFilter = new HWFilter(bitmap);

            GrayscaleFilter gsFilter    = new GrayscaleFilter();
            GammaFilter     gammaFilter = new GammaFilter(gamma);

            hwFilter.AddFilter(gsFilter);
            hwFilter.AddFilter(gammaFilter);
            hwFilter.ApplyFilters();
            return(bitmap);
        }