How does one create a color table

  • Thread starter Thread starter active
  • Start date Start date
A

active

Converting a 24bpp to 8bpp the default color table leaves something to be
desired.

How does one create a color table.

Is there any Windows API or managed class that does that?

I started reading about octtree but haven't got very far that way.

Is that what I should continue to pursue?


thanks
 
Octree is the way to go.

Not only does it produce reasonable adaptive palettes, but they are also
very quick for matching your image colors to the palette colors.

For best results you should dither also. For photo images I use a Floyd
Steinberg dither on each channel, and it's sometimes hard to tell the 8bit
from the 24 bit source.
 
I've been reading about it. I've found some code, C or C++
Do you happen to know of a site with vb or C# code?


Thanks for the direction info.
 
I know the source to Paint Dot Net uses one for quantizing.

The file is OctreeQuantizer.cs

I used it a a reference when rolling my own.

I was able to make mine a little faster.
 
Thanks
Using the file name you gave me I found a C# solution called ImageQuantizer
that appears to be a complete dotnet solution to my need. Haven't tried to
use it yet but it runs stand-alone OK.


Thanks again
 
Back
Top