[magick-users] Making a Drop Shadow Text Image
zentara
zentara1 at sbcglobal.net
Mon Nov 24 11:38:18 PST 2008
On Sat, 22 Nov 2008 05:16:03 +0700
"Robert Parker" <rlp1938 at gmail.com> wrote:
>Hello,
>
>I just read the thread on 'Adding text to an image' and it has inspired me
>to want to create a drop shadow text image using a script. Both the value of
>text and its color will be parameters to the script. The background of the
>final image is to be transparent.
>
>To that end I need to learn the following:
>1. What parameters may I use to 'xc:'?
>2. Once I have a text on a suitable background how can I determine the
>bounding box for the text and cut the image to that size?
>3. If I can do step 2 then I can create the same text in say a dark gray for
>the shadow. How do I apply a small guassian blur to the shadow image?
>
>Thanks,
>Bob
I was just looking thru the IM hhelp pages online, and saw this
http://www.imagemagick.org/Usage/annotating/#anno_on
You can put a text with transparent bg on an image with
the undercolor set to 00 saturation ( the last 2 0's on the color )
##########################################
#!/bin/sh
#usage: ./thisscript text file
txt=$1
file=$2
convert $file -fill white -undercolor '#00000000' -gravity South \
-pointsize 36 -fill pink -stroke pink \
-annotate +0+5 $txt output-trans.jpg
########################################3
zentara
--
I'm not really a human, but I play one on earth.
http://zentara.net/Remember_How_Lucky_You_Are.html
More information about the Magick-users
mailing list