Quantize using an Octree
Inheritance: Quantizer
Example #1
0
        // Save a GIF, using OctTree pallettee.
        public static void SaveGif(Bitmap bitmap, string fileName)
        {
            OctreeQuantizer quantizer = new OctreeQuantizer(255, 8);

            using (Bitmap quantized = quantizer.Quantize(bitmap)) {
                quantized.Save(fileName, ImageFormat.Gif);
                quantized.Dispose();
            }
        }
Example #2
0
        // Save a GIF, using OctTree pallettee.
        public static void SaveGif(Bitmap bitmap, string fileName)
        {
            OctreeQuantizer quantizer = new OctreeQuantizer(255, 8);

            using (Bitmap quantized = quantizer.Quantize(bitmap)) {
                quantized.Save(fileName, ImageFormat.Gif);
                quantized.Dispose();
            }
        }