using System.Drawing;

namespace ZionGraphics.Filtering
{
    class RotateBicubic : IFilter
    {
        public override Bitmap Apply(Bitmap bitmap)
        {
            if (bitmap.PixelFormat != System.Drawing.Imaging.PixelFormat.Format8bppIndexed)
            {
                bitmap = AForge.Imaging.Filters.Grayscale.CommonAlgorithms.BT709.Apply(bitmap);
            }

            AForge.Imaging.Filters.RotateBicubic filter = new AForge.Imaging.Filters.RotateBicubic(Intensity);
            bitmap = filter.Apply(bitmap);
            return bitmap;
        }
    }
}
