示例#1
0
        public static Dither BillAtkinsonDither(Palette palette, bool applyGS)
        {
            DitherFactor[] factors = new DitherFactor[6]
            {
                new DitherFactor(1, 0, 0.125f),
                new DitherFactor(2, 0, 0.125f),
                new DitherFactor(-1, 1, 0.125f),
                new DitherFactor(0, 1, 0.125f),
                new DitherFactor(1, 1, 0.125f),
                new DitherFactor(0, 2, 0.125f)
            };
            Dither dither = new Dither(factors, palette, applyGS);

            return(dither);
        }
示例#2
0
        public static Bitmap ApplyBillAtkinson(Bitmap bitmap, Palette palette, bool applyGS)
        {
            Dither dither = BillAtkinsonDither(palette, applyGS);

            return(dither.ApplyDither(bitmap));
        }