I'm using following command with transparent png image "heart.png" has black background when applied opacity in -draw command.
convert -size 500x500 xc:white -draw "translate 225,250 opacity 0.5 image over -200,-150 450,300 'heart.png'" output.jpg
Can anyone help me in this please?
background transparency problem
-
- Posts: 2
- Joined: 2015-06-02T02:27:27-07:00
- Authentication code: 6789
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: background transparency problem
JPG doesn't support transparency.
snibgo's IM pages: im.snibgo.com
-
- Posts: 2
- Joined: 2015-06-02T02:27:27-07:00
- Authentication code: 6789
Re: background transparency problem
its not a matter what is output format... i wants to apply opacity on heart.png and outcome of that write on output file(jpg or png). my problem is I don't wants opacity on transparent area. by default its assumes black background and applied opacity on whole area in place of graphics only. I can get it using following command
convert heart.png -matte -channel A -evaluate set 50% -channel rgba output.png
or
convert heart.png -matte -channel A +level 0,50% +channel output.png
but i wants it using -draw command.
convert heart.png -matte -channel A -evaluate set 50% -channel rgba output.png
or
convert heart.png -matte -channel A +level 0,50% +channel output.png
but i wants it using -draw command.