|
From: Daniel J S. <dan...@ie...> - 2016-07-07 19:22:21
|
On 07/07/2016 01:44 PM, Ethan A Merritt wrote:
> On Thursday, 07 July, 2016 12:01:27 Daniel J Sebald wrote:
>> I'm working on something with alpha channel and noticed that the alpha
>> channel 0 to 1 range behaves differently for color specification and for
>> input data. For color spec (help colorspec):
>>
>> "#AARRGGBB" represents an RGB color with an alpha channel (transparency)
>> value in the high bits. An alpha value of 0 represents a fully opaque
>> color;
>> i.e., "#00RRGGBB" is the same as "#RRGGBB".
>>
>> and for rgbalpha (help alpha):
>>
>> The `rgbalpha` plotting style assumes that each pixel of input data
>> contains
>> an alpha value in the range [0:255]. A pixel with alpha = 0 is purely
>> transparent and does not alter the underlying contents of the plot. A
>> pixel
>> with alpha = 255 is purely opaque.
>>
>> Was there a reason for the opposite correlation of the opacity/transparency?
>
> Removing the inconsistency between line colors and image pixel colors
> was on the list of possible major changes in gnuplot version 5.
> There was a bit of discussion at the time, but no one argued strongly
> enough for unification to outweigh the clear disadvantages:
> - breaking backward compatibility
> - inherent conflict of obvious defaults:
> line color #00RRGGBB "obviously" should be the same as #RRGGBB
> but
> image processing has historically used alpha=0 as fully transparent
>
> This same inconsistency of whether "0" is fully transparent or fully
> opaque is present in real-world image formats and in other program
> implementations.
Yeah, I just had an example where the software's documentation referred
to "transparency", but 1 in the range [0,1] is opaque. In some sense,
the solution is to correlate the range with a description. In this case
"alpha" is nebulous and takes on two meanings. There could be
rgbtransparent
rgbopaque
rather than rgbalpha. Can't really do such a thing with "line color
#[]RRGGBB" though.
Unless, perhaps a meaning were to be given to alpha, e.g.,
set alpha {transparent|opaque}
Dan
|