Color Quantization and GDI+ GIF with much better quality

OnErr0r

Member
Joined
Jul 21, 2003
Messages
19
Location
Debug Window
This sample shows how to decrease colors in an image from 24bit to 8 bit. And various other numbers of colors as well, from 8 to 256. Quantization is done by using an octree. Many thanks to vbaccelerator.com.

GDI+ uses a halftone palette by default to save the image to file. This leads to terrible quality in many cases. This sample greatly improves the saved GIF image. Enjoy!
 

Attachments

Last edited by a moderator:
Color Quantization Update

I have added Arrays to create bitmap objects and GDI+ API. Quantization is substantially faster now.
 

Attachments

Last edited by a moderator:
Back
Top