IM 6.4.3-6 Q16 Mac OSX Tiger
This is not critical, but I just wanted to point it out. There seems to be a slight inconsistency in converting alpha values in the range 0-1 to 8-bit values relative how rgb values in range 0-100% are converted to 8-bit values.
For example:
convert -size 1x1 xc:"rgba(100%,75%,50%,0.5)" -depth 8 txt: | \
sed -n 's/ //g; s/^.*[^(]\((.*)\)[^)].*$/\1/p'
(255,191,127,128)
The rgb value of 50% goes to 127, but the alpha value of .5 goes to 128
On the other hand, the following is consistent due to the consistent use of floor()
convert -size 1x1 xc:"rgba(100%,75%,50%,0.5)" \
-format "(%[fx:floor(255*r)],%[fx:floor(255*g)],%[fx:floor(255*b)],%[fx:floor(255*a)])" info:
(255,191,127,127)
slight inconsistency converting alpha in txt: IM 6.4.3-6
Re: slight inconsistency converting alpha in txt: IM 6.4.3-6
The TXT format looks like this:
- 0,0: (255,191,127,128) #FFBF7F80 rgba(255,191,127,0.501961)