Quantcast

Alpha channel transparency value consistency

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Alpha channel transparency value consistency

Daniel J Sebald
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?

Dan

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
gnuplot-beta mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Alpha channel transparency value consistency

sfeam
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.

        Ethan

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
gnuplot-beta mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Alpha channel transparency value consistency

Daniel J Sebald
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

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
gnuplot-beta mailing list
[hidden email]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
Loading...