possible bug gradient with transparency IM 6.8.5.6 Q16 Mac
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: possible bug gradient with transparency IM 6.8.5.6 Q16 M
OK. But see my previous posts about the notes in red.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: possible bug gradient with transparency IM 6.8.5.6 Q16 M
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.red disappears too quickly and leave too much of the image transparent
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: possible bug gradient with transparency IM 6.8.5.6 Q16 M
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.
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.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: possible bug gradient with transparency IM 6.8.5.6 Q16 M
Remember...
alpha is linear... color is non-linear.
It is very very hard to compare alpha and color gradients!
alpha is linear... color is non-linear.
It is very very hard to compare alpha and color gradients!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: possible bug gradient with transparency IM 6.8.5.6 Q16 M
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.
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.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: possible bug gradient with transparency IM 6.8.5.6 Q16 M
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!
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!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: possible bug gradient with transparency IM 6.8.5.6 Q16 M
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.