Page 2 of 2

Re: possible bug gradient with transparency IM 6.8.5.6 Q16 M

Posted: 2013-05-13T23:08:50-07:00
by fmw42
OK. But see my previous posts about the notes in red.

Re: possible bug gradient with transparency IM 6.8.5.6 Q16 M

Posted: 2013-05-13T23:09:49-07:00
by anthony
red disappears too quickly and leave too much of the image transparent
Actually it doesn't -- it becomes a red-grey which to us looks more transparent than it is. Especially if overlaid on grey, or white backrgound for display.

Re: possible bug gradient with transparency IM 6.8.5.6 Q16 M

Posted: 2013-05-13T23:11:48-07:00
by fmw42
Look at all three image from that post and you will see if you compare them that they are all different and the first two do not match the properly created gradient.

I am more interested in being able to produce a proper multi-stop gradient using a 2D black-white gradient and colorizing with a 1D multicolor (with at least some transparency) using -clut.

Re: possible bug gradient with transparency IM 6.8.5.6 Q16 M

Posted: 2013-05-13T23:18:32-07:00
by anthony
Remember...
alpha is linear... color is non-linear.

It is very very hard to compare alpha and color gradients!

Re: possible bug gradient with transparency IM 6.8.5.6 Q16 M

Posted: 2013-05-13T23:24:25-07:00
by fmw42
why are these two not equivalent:

convert \( -size 256x50 xc:red \) \
\( -size 50x256 gradient: -rotate -90 +write show: \) \
-alpha off -compose copy_opacity -composite show:

convert -size 50x256 gradient:red-none -rotate -90 show:

Since if I remove the alpha on the latter I get a red base image, which is just what I create in the first one.

Re: possible bug gradient with transparency IM 6.8.5.6 Q16 M

Posted: 2013-05-14T00:18:51-07:00
by anthony
because it would not handle something like...

gradient:red-{half-transparent-blue}

correctly.

Actually I which you could use something like alpha(blue,0.5) where 'blue' is any color name.


Note the red-blue gradient in each of these is different according to the '4D Cubic-Cone' colorspace
convert -size 30x500 gradient:'red-rgba(0,0,255,1)' -rotate 90 -alpha off show:
convert -size 30x500 gradient:'red-rgba(0,0,255,0.7)' -rotate 90 -alpha off show:
convert -size 30x500 gradient:'red-rgba(0,0,255,0.5)' -rotate 90 -alpha off show:
convert -size 30x500 gradient:'red-rgba(0,0,255,0.1)' -rotate 90 -alpha off show:

the lowest one is mostly red. That is correct behaviour!

Re: possible bug gradient with transparency IM 6.8.5.6 Q16 M

Posted: 2013-05-14T17:00:05-07:00
by fmw42
Thanks Anthony and Magick. I now have a better understanding of gradients with transparency. I have been able to create proper gradients now in my new script, multigradient, that can generate either linear or radial gradients with color stops.