Transparencies from the command line
Transparencies from the command line
From the command line, is there any possible way to play around with transparencies? I would like to be able to dynamically print text on a gif or png, but have the font actually act like a mask that lets the background show through. So the actual opaque part of the image is the negative space around the text.
Re: Transparencies from the command line
Something like this: http://www.rubblewebs.co.uk/imagemagick ... adiant.png
You could setup a form and read the input into a variable; then use the variable in the mask. There may be another way to do it but that seems simple to me.
You could setup a form and read the input into a variable; then use the variable in the mask. There may be another way to do it but that seems simple to me.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Transparencies from the command line
There is a quite a number of techniques you can use. using the background image as a tiled 'fill color', See...
http://www.imagemagick.org/Usage/text/#size
or a white font on a black background as a greyscale mask
http://www.imagemagick.org/Usage/channels/#masks
http://www.imagemagick.org/Usage/channe ... ed_compose
http://www.imagemagick.org/Usage/text/#size
or a white font on a black background as a greyscale mask
http://www.imagemagick.org/Usage/channels/#masks
http://www.imagemagick.org/Usage/channe ... ed_compose
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Transparencies from the command line
Thank you Anthony. That was perfect. I can't believe I can do this through the command line!
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Transparencies from the command line
That shows you the power of IM and why it has gained popularity. people only needed to know what it can do, and IM examples filled that need.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/