If an image is somewhat crowded, a caption will overlap other detail. So it would be
helpful if the caption could be semi-transparent. I tried this colour:
-c "rgb(111,198,242,0.2)" and this
-c "rgb(111,198,242,0."
with both gif and png files. The caption colour was opaque in all cases.
Is there a way to create a semi transparent caption?
Regards
Fred's autocaption and semi-transparency
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Fred's autocaption and semi-transparency
Make sure the image has 'alpha' enabled. Sometimes this effects how secondary images are generated and then overlaid. The caption operator (image coder actually) may be one of those cases, as it uses a external delegate library to convert text into an image. It could be regarded as small bug.
EG -alpha set should be applied after reading the image. By default alpha is not saved if the image ha fully opaque when writing (unles you override that).
EG -alpha set should be applied after reading the image. By default alpha is not saved if the image ha fully opaque when writing (unles you override that).
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: Fred's autocaption and semi-transparency
I make this mistake all the time
-c "rgba(111,198,242,0.2)"
it works for me
see
http://www.imagemagick.org/script/color.php
try-c "rgb(111,198,242,0.2)" and this
-c "rgba(111,198,242,0.2)"
it works for me
see
http://www.imagemagick.org/script/color.php
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Fred's autocaption and semi-transparency
Good spot Fred! I missed it!
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: Fred's autocaption and semi-transparency
I missed it also at first and went about testing my script. I spent some time until I realized that was the mistake and not my script.anthony wrote:Good spot Fred! I missed it!