Page 1 of 1

Fred's autocaption and semi-transparency

Posted: 2012-03-06T05:06:48-07:00
by djd
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.8)"
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

Re: Fred's autocaption and semi-transparency

Posted: 2012-03-06T06:14:19-07:00
by anthony
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).

Re: Fred's autocaption and semi-transparency

Posted: 2012-03-06T11:57:29-07:00
by fmw42
I make this mistake all the time
-c "rgb(111,198,242,0.2)" and this
try

-c "rgba(111,198,242,0.2)"

it works for me


see
http://www.imagemagick.org/script/color.php

Re: Fred's autocaption and semi-transparency

Posted: 2012-03-06T19:30:15-07:00
by anthony
Good spot Fred! I missed it!

Re: Fred's autocaption and semi-transparency

Posted: 2012-03-06T19:56:56-07:00
by fmw42
anthony wrote:Good spot Fred! I missed it!
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.