how to create semi-transperant images?

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?".
Post Reply
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Post by el_supremo »

Try this:

Code: Select all

convert your_input_image.jpg -fill rgba(0,0,100%,0.75) -stroke black -draw "circle 50,30 40,10" draw_circle.gif
you can then play with the rgba function to produce the colour and opacity you need. It can also be used as an argument to "-stroke".
For more info on rgba see the -fill argument at:
http://www.imagemagick.org/script/comma ... s.php#fill

Pete
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

We both of you need to re-think your final output image format.

I say it on just about every page in IM examples...
GIF does not understand semi-transparency!!!!!
This format is limited to 256 characters one of which can represent full-transparency. That is you either can have a color or transparent. Not semi-transparency.

See IM Examples, Common Image formats, GIF

If you want semi-transparency, use PNG format. OR flatten the image onto a background image, to remove transparecnty completly.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Post by el_supremo »

GIF does not understand semi-transparency!!!!!

Arrggghhhhhhhh.
:oops:

Pete
Post Reply