|
From: Hans-Bernhard B. <br...@ph...> - 2003-10-30 09:07:54
|
On Thu, 30 Oct 2003, Petr Mikulik wrote:
> > If you're going to 'save' it to a file, wouldn't the most sensible place
> > be a sub-option of the 'save' command? So IMHO it should be something
> > like
> >
> > save palette '<filename>' ncolors <n>
>
> That could confuse user whether it is saving "set palette" or the discrete
> r,g,b values of the current palette.
I strongly doubt it'll be less confusing than breaking the existing
tradition that 'show' shows, and 'save' writes to file.
And if you really suspect confusion, you could still use a different name
than 'palette' to distinguish it from 'show palette'. Say 'save
rgbpalette'.
> I find it more logic to be able to save
> the rgb table to a file at the same place it can write it to screen.
But the problem is you're planning to write to screen something different
than what you would save to file, anyway. If you want the actual
'show' output in a file, there's always 'set print' for that, right?
> > > show palette palette <n> {savergb {<scale> {int}} 'filename'}
> >
> > The doubling of 'palette' in there feels wrong, to me.
>
> It's OK -- there are more "show palette" print options, see "help palette".
Sure --- but that still doesn't make 'palette' a good sub-option name. If
you worry about confusing the user, this should have you pretty worried,
IMHO.
> > I seriously doubt that all that scaling is worth the hassle. Either write
> > out floats, or ints scaled up to the usual 8-bit range.
>
> I think it is worth it: some apps loading rgb palettes require integer range
> 0..255, others float range 0..1.
Exactly --- and those are the *only* ones I've ever seen anybody use.
Which means there's hardly any point offering a selection much more
general than that. A simple option {int | float} would be sufficient.
For plotting the colour profiles from gnuplot, you wouldn't need it all,
of course...
--
Hans-Bernhard Broeker (br...@ph...)
Even if all the snow were burnt, ashes would remain.
|