Help Figuring out why Transparency Isn't Working

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Locked
xstatic
Posts: 17
Joined: 2014-11-13T00:48:47-07:00
Authentication code: 6789

Help Figuring out why Transparency Isn't Working

Post 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

snibgo
Posts: 13034
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Help Figuring out why Transparency Isn't Working

Post 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.
snibgo's IM pages: im.snibgo.com

xstatic
Posts: 17
Joined: 2014-11-13T00:48:47-07:00
Authentication code: 6789

Re: Help Figuring out why Transparency Isn't Working

Post by xstatic »

ImageMagick 6.7.8-9 is my version.

Ok, will do on the +write.

- Craig

xstatic
Posts: 17
Joined: 2014-11-13T00:48:47-07:00
Authentication code: 6789

Re: Help Figuring out why Transparency Isn't Working

Post by xstatic »

Ah I think I sorted it out. Won't take any more of your time. Thanks for the help!
- Craig

Locked