Page 1 of 1

Help Figuring out why Transparency Isn't Working

Posted: 2020-03-21T22:12:05-07:00
by xstatic
I have the following command that is meant to overlay a partially transparent rounded black box over a red box (specific command is represented in the third line below.)

Hope I formatted the slashes right. I generally run my commands in php with shell_exec, so my apologies if I lay it out wrong with the slashes.

So, everything works with my command, except, that while the rounded box on the third line should be partially transparent, it is showing up fully filled in without transparency. The image at the bottom is how it looks now. What might I be doing wrong?


/usr/bin/convert \( -gravity center -size 1435.84721x153.0147 -background none \
-font Oswald.ttf -pointsize 60 -fill "rgb(255, 255, 255)" caption:"text" \) \
\( -size 1435.84721x153.0147 xc:gray -fill "rgba(255, 255, 0, 0.5)" \
-draw "roundrectangle 1,1 1435.84721,153.0147 30.60294,30.60294" -transparent gray \
-virtual-pixel gray -blur 3x35 -level 40,60% \) +swap -compose over -composite \
-size 1920x1080 xc:red +swap -composite -gravity northwest -geometry +244.20079+916.30898 -compose over -composite /test.jpg

Image

Re: Help Figuring out why Transparency Isn't Working

Posted: 2020-03-21T22:25:54-07:00
by snibgo
What version of IM?

I suggest you insert "+write x0.png", "+write x1.png" etc at suitable positions in your command. This will track down where the problem is.

Re: Help Figuring out why Transparency Isn't Working

Posted: 2020-03-21T22:32:48-07:00
by xstatic
ImageMagick 6.7.8-9 is my version.

Ok, will do on the +write.

- Craig

Re: Help Figuring out why Transparency Isn't Working

Posted: 2020-03-21T22:43:22-07:00
by xstatic
Ah I think I sorted it out. Won't take any more of your time. Thanks for the help!
- Craig