The gdiplus.dll version 6.x now offers color quantization with minimal coding. With as little as two lines of code a GDI+ bitmap can be quantized with an optimal palette. If a custom palette is desired, GDI+ does excellent error reduction dithering from the original image to the new palette. This example also demonstrates histogram generation for an image.
If you have Office 03, Visio 03 or PowerPoint Viewer 03, then you should have version 6 installed already. You will need to move the dll to the app.path of this project, or \windows\system32 or equivalent. If you are an XP user, place the gdiplus.dll in the app.path of the exe. Then create an empty file called: Exename.exe.local
That will allow XP Side-by-side component sharing to find the dll.
The new tlb has a new GUID and version, so it will not interfere with any previous versions. It cannot be used with the 5.0 version of the dll, as various functions do not exist.
If you do not have any of those installed, you can get the free PowerPoint Viewer 03 here:
http://www.microsoft.com/downloads/d...displaylang=en
Once installed, you will then find the gdiplus.dll 6.0.32.64 (or newer) installed at: c:\program files\microsoft office\powerpoint viewer. Copy the file and place as mentioned previously.