On 6/25/2004 6:56 PM, dan wrote:

Hi all, again!

I'm attempting to make a web page, where all the buttons are dynamic, where
dynamic I say there's 1 "template" button image with nothing written on it,
and I want to put requests into a html page to call a script as an image to
put text on top of the image, then output as 1 image. Does this make sense
what I'm try to do? Is this even possible? If so, what's the best way of
going about it, as I have absolutely no idea where to start on this one.
I've aquired Apache::ImageMagick, but can't make head nor tail of the
readme.

Try the GD module. I think it does what you want.

(untested)

use GD;

my $img = GD::Image->newFromJpeg( $file );
my $black = $img->colorAllocate( 0, 0, 0 );
$img->string( gdSmallFont, 10, 10, 'Custom Text', $black );

open( FH, '>outfile' ) or die;
binmode( FH );
print FH $img->png();
close( FH );

__END__

Regards,
Randy.



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to