Re: Color Class
| From: | Rasmus Lerdorf | Date: | Mon, 26 Nov 2001 15:01:26 +0000 |
| Subject: | Re: Color Class | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-3111@lists.php.net to get a copy of this message | ||
> > > It will probably more flexible to not store all differents colors
> > > value in the same array. There are many colors standart (Rasmus told
> > > us about cmyk and spots b.e.) and maybe pantone and others stuffs like
> > > that. The array will grow too much. One array per colortype
> > > PEAR_Colors_RGB PEAR_Colors_CMYK,... ? We don't need to include all
> > > colors and maybe more modular.
> >
> > Or store it in one format and figure out the appropriate conversion
> > algorithms to the various other formats. Some cannot be automatically
> > converted, but for the ones that can there is no reason to duplicate the
> > data.
> >
>
> It's not a "space" problem it's a "speed" problem. Think on
> gradients or
> "show colors" operations.
But a "space" problem becomes a speed problem since this is done in user
space on a per-request basis. For this to not be a speed issue you'd need
to write this in C and have it initialized just once in the module startup
hook.
-Rasmus