using System.Drawing;

namespace ZionGraphics.Filtering
{
    class ColorFiltering : IFilter
    {
        public override Bitmap Apply(Bitmap bitmap)
        {
            byte[] fillColor = { 255, 255, 255 };
            AForge.Imaging.Filters.ColorFiltering filter = new AForge.Imaging.Filters.ColorFiltering();
            filter.FillColor = new AForge.Imaging.RGB(fillColor[0], fillColor[1], fillColor[2]);
            filter.Red = new AForge.IntRange(0, Red);
            filter.Blue = new AForge.IntRange(0, Blue);
            filter.Green = new AForge.IntRange(0, Green);
            return filter.Apply(bitmap);
        }
    }
}
