|
From: Dima K. <gn...@di...> - 2017-08-17 20:54:56
|
Ethan A Merritt <sf...@us...> writes:
> I agree that it makes no sense to apply the palette range (cbrange)
> to rgb data.
> For example this just seems wrong to me:
>
> # looks nice
> plot 'nicepicture.jpeg' binary filetype=auto with rgbimage
> # messed up
> set cbrange [50:100]
> replot
> # lost altogether
> set log cb
> replot
>
> So yes, cb2gray() should not be used for RGB data components.
> Let's plan to replace it in 5.3 with a new routine rgb2gray(),
> exact behaviour to be discussed.
>
> Then the question becomes how or if to autoscale the rgb components.
> And if we decide it should be under user control, should it be
> treated as an axis,
> e.g. set rgbrange[0:255]
> or 3 or 4 separate axes
> e.g. set bluerange [0:1]; set alpharange [0:1]
> or a new set of non-axis commands
> set rgb {autoscale | 8bit_channels | grayscale}
> or something else entirely.
>
> If backward compatibility with current behaviour is a concern
> (not sure it is in this case), then the default could be
> to use the cbrange if the user has not set something else.
OK, that sounds like a plan. In the meantime I'm going to apply the
attached patch to my own builds. This detaches the rgb colors from the
palette entirely, both for autoscaling and for rendering. Works OK in
initial testing.
Thanks
|