Page 1 of 1
Transparencies from the command line
Posted: 2007-06-10T16:13:56-07:00
by mattalexx
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
Posted: 2007-06-11T05:27:23-07:00
by Bonzo
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.
Re: Transparencies from the command line
Posted: 2007-06-11T19:01:50-07:00
by anthony
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
Re: Transparencies from the command line
Posted: 2007-06-13T00:00:23-07:00
by mattalexx
Thank you Anthony. That was perfect. I can't believe I can do this through the command line!
Re: Transparencies from the command line
Posted: 2007-06-13T00:25:37-07:00
by anthony
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.