If you could afford the memory, it would probably make a lot of sense to
keep a shadow of the table in a different color space (ex. HSV).  You
could then basically use the same loop for grayscale and RGB.  Better
yet, you could hash the HSV values and make the test for matches a lot
faster as well.

This sort of thing comes up a lot in high end color printing.

Regards,
-jjf

-----Original Message-----
From: Bob Ebert [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 13, 2000 12:08 PM
To: Palm Developer Forum
Cc: Palm Developer Forum
Subject: Re: WinRGBToIndex slow ?

[ snip ]

The algorithm first attempts to do an intensity match.  That is, it
computes the intensity value of the RGB color = (2*red + 5*green +
blue)/8,
and compares this value with the reference color table brightness
values.
It will keep doing this as long as the Red, Green, and Blue values in
each
color table entry are all equal.

[ snip ]

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to