Page 1 of 1

Posted: 2006-08-30T11:38:05-07:00
by magick
Use xc:black rather than xc:none.

Posted: 2006-08-30T18:54:33-07:00
by glennrp
nor wrote:
magick wrote:Use xc:black rather than xc:none.

This is not what I need!.. This just creates a black background and still it puts an opaque image on it. I need the transparent bg (wich I can get with xc:none or xc:transparent) and the drawn image (bg.png) should have 60% opacity...

Can this be done? Thanks.

  • composite -dissolve 60% fg.png bg.png combined.png
Maybe omitting the "%"; I forget.

Posted: 2006-09-02T21:13:17-07:00
by anthony
Refering to your original attempt using rgba(0,0,0,124), you can do it using a
'matte' color fill. matte uses the transparency valur of the -fill colro seeting to
seth the alpha channel of the filled area.

Note however that, as per SVG standards the alpha component of rgba() is a decimal number. EG: rgba(0,0,0, 0.6 )

convert rose: -fill "rgba(0,0,0,0.6)" -draw 'matte 0,0 reset' semi-trans-rose.png

If you want a black border around a semi-transparent black 'window', as you original example is impling, then just create such a rectangle, and add a black border
(you must use a "-compose Copy" setting to preserve the semi-transparency).

convert -size 64x64 xc:"rgba(0,0,0,0.6)" \
-bordercolor black -compose Copy -border 18x18 \
black_window.png

As with anything with IM, you can do just about anything. You just need to describe what you want exactly, rather than how you are attempting to do it.