[magick-users] Gradient text with PerlMagick
Eric Adum
eric.adum at gmail.com
Thu Aug 16 12:55:19 PDT 2007
Hi,
I'm wondering if there is any way in PerlMagick to create text colored with
a gradient.
Using the command-line interface, it is done in the following way (taken
from the excellent IM Examples page,
http://www.imagemagick.org/Usage/text/-- I'd love to see PerlMagick
equivalents added to those examples)
convert -size 480x80 gradient:yellow-green -font Generic.ttf
-pointsize 70 -tile gradient:blue-red -annotate +10+65 'Gradient Fun'
funfont_gradients.jpg
However, the annotate method in Perl doesn't take a "tile" parameter, and
passing a 'gradient:yellow-green' to the "fill" parameter doesn't seem to
work (and I don't think it should, since my understanding is that gradient:
is a pre-defined image-handle, and that "fill" takes a color, not an
image-handle.
Any help would be much appreciated. I've worked around the problem for now
using something of the form:
my $blob = `convert ... png:-`; # this causes convert to output to STDOUT,
which Perl reads in, and yields the equivalent of my $blob =
$img->ImageToBlob()
...but ideally I would be able to use the Perl interface exclusively.
Thanks,
Eric
More information about the Magick-users
mailing list