public static bool FilterGrayscale(Bitmap bitmap) { HWFilter hwFilter = new HWFilter(bitmap); GrayscaleFilter gsFilter = new GrayscaleFilter(); hwFilter.AddFilter(gsFilter); return(hwFilter.ApplyFilters()); }
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); }