By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,710 Members | 1,338 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,710 IT Pros & Developers. It's quick & easy.

How does one create a color table

P: n/a
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

Jul 31 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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.


" active" <ac**********@a-znet.comwrote in message
news:ub**************@TK2MSFTNGP04.phx.gbl...
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
Jul 31 '07 #2

P: n/a
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.

"Blake" <no@emailwrote in message
news:Of**************@TK2MSFTNGP06.phx.gbl...
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.


" active" <ac**********@a-znet.comwrote in message
news:ub**************@TK2MSFTNGP04.phx.gbl...
>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

Jul 31 '07 #3

P: n/a
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.
" active" <ac**********@a-znet.comwrote in message
news:Oa**************@TK2MSFTNGP04.phx.gbl...
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.

"Blake" <no@emailwrote in message
news:Of**************@TK2MSFTNGP06.phx.gbl...
>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.


" active" <ac**********@a-znet.comwrote in message
news:ub**************@TK2MSFTNGP04.phx.gbl...
>>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

Jul 31 '07 #4

P: n/a
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
"Blake" <no@emailwrote in message
news:eP**************@TK2MSFTNGP05.phx.gbl...
>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.
" active" <ac**********@a-znet.comwrote in message
news:Oa**************@TK2MSFTNGP04.phx.gbl...
>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.

"Blake" <no@emailwrote in message
news:Of**************@TK2MSFTNGP06.phx.gbl...
>>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.


" active" <ac**********@a-znet.comwrote in message
news:ub**************@TK2MSFTNGP04.phx.gbl...
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



Aug 1 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.