> > >could it be that the "WinRGBToIndex" call is very slow ?
> > 
> > Well, "very" is obviously subjective, so it is hard to give an absolute
> > answer.  However, think about what the routine needs to do: given a
> > three-byte value, search through 256 unsorted and presumably unique values
> > to find the closest one to the given value.
> > 
> > No wonder it is slow :-)
> > 
> > Presumably you'd be able to cache the index that you want, unless you're
> > changing the palette all the time.

  actually.. when i was at the CDC i saw the source code to this routine
  hopefully finding a good implementation for the PilRC rgbtoindex()
  routine.. :))

  it is a complex routine, and if you are going to call it - do it in
  your initialization of the application. then you can keep a 256 byte
  array of color indexes in which you can address later very quickly :)

az. 
--
Aaron Ardiri 
Java Certified Programmer      http://www.hig.se/~ardiri/
University-College i G�vle     mailto:[EMAIL PROTECTED]
SE 801 76 G�vle SWEDEN       
Tel: +46 26 64 87 38           Fax: +46 26 64 87 88
Mob: +46 70 656 1143           A/H: +46 8 668 78 72

if you enjoy it, then it aint work :) - rule #106 of life


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

Reply via email to