LRMK
----- Original Message ----- 
From: "dan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 29, 2004 3:33 AM
Subject: Re: Creating images


> This does exactly what I want, except I used the output code from
> JupiterHost.Net's suggestion, as i wanted to output straight to the
browser,
> not to a file. The only other issue I'd have, is it possible to change the
> font of "Custom Text" to Tahoma? If so, how do it do it, and do I need any
> additional files?
>
> Cheers, Dan
>
>
> "Randy W. Sims" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > 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 );
                            #To output to the browser use the following
method
    print "Cache-Control: no-cache\n";    #probably you will need this line
to stop browsing from caching your output
    print "Content-Type: image/png\n\n";  #tell the browser and the server
what type of data that you are sending
    binmode(STDOUT);
    print $img->png();



> >
> > __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>
>
>


-- 
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