RE: [PHP] Generate inline image

2002-05-28 Thread Rasmus Lerdorf

How about the obvious way?



-Rasmus

On Tue, 28 May 2002, Engineering Software Center wrote:

> Hi: all:
>
> With helps from Martin, now I can create images on the fly.
> I used code like  to create my
> images.  However, with this option, how can I pass a variable to
> generateimage.php?  The php scrip is supposed to take a variable: say
> ImageID and looks up the MySQL database for all values and then draw the
> graph.  Anyone can give me some help?
>
> Thank you,
>
> Frank
>
>
> On Mon, 13 May 2002, Martin Towell wrote:
>
> > yep, then in the file generateimage.php you'd have
> >  >   $im = imagecreate(...);
> >   // ... image creation code here
> >   header("Content-Type: image/png");  // I do this anyway, I've found some
> > browsers complain when you don't
> >   imagepng();
> >   imagedestroy($im);
> > ?>
> >
> > obviously, the above "code" is for png, but you can use any that your gd
> > library/broswer supports.
> >
> > -Original Message-
> > From: Engineering Software Center [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, May 13, 2002 2:42 PM
> > To: Martin Towell
> > Cc: [EMAIL PROTECTED]; php
> > Subject: RE: [PHP] Generate inline image
> >
> >
> >
> > Thanks for the reply.  But how do I do that exactly?
> >  ?
> > is this correct?
> >
> >
> > > HTML docs only contain text. If you want images "inline" then you use the
> > >  tag.
> > >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Generate inline image

2002-05-28 Thread Engineering Software Center

Hi: all:

With helps from Martin, now I can create images on the fly.
I used code like  to create my
images.  However, with this option, how can I pass a variable to
generateimage.php?  The php scrip is supposed to take a variable: say
ImageID and looks up the MySQL database for all values and then draw the
graph.  Anyone can give me some help?

Thank you,

Frank


On Mon, 13 May 2002, Martin Towell wrote:

> yep, then in the file generateimage.php you'd have
>$im = imagecreate(...);
>   // ... image creation code here
>   header("Content-Type: image/png");  // I do this anyway, I've found some
> browsers complain when you don't
>   imagepng();
>   imagedestroy($im);
> ?>
> 
> obviously, the above "code" is for png, but you can use any that your gd
> library/broswer supports.
> 
> -Original Message-
> From: Engineering Software Center [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 13, 2002 2:42 PM
> To: Martin Towell
> Cc: [EMAIL PROTECTED]; php
> Subject: RE: [PHP] Generate inline image
> 
> 
> 
> Thanks for the reply.  But how do I do that exactly?
>  ?
> is this correct?
> 
> 
> > HTML docs only contain text. If you want images "inline" then you use the
> >  tag.
> > 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Generate inline image

2002-05-12 Thread Martin Towell

yep, then in the file generateimage.php you'd have


obviously, the above "code" is for png, but you can use any that your gd
library/broswer supports.

-Original Message-
From: Engineering Software Center [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 13, 2002 2:42 PM
To: Martin Towell
Cc: [EMAIL PROTECTED]; php
Subject: RE: [PHP] Generate inline image



Thanks for the reply.  But how do I do that exactly?
 ?
is this correct?


> HTML docs only contain text. If you want images "inline" then you use the
>  tag.
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Generate inline image

2002-05-12 Thread Engineering Software Center


Thanks for the reply.  But how do I do that exactly?
 ?
is this correct?


> HTML docs only contain text. If you want images "inline" then you use the
>  tag.
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Generate inline image

2002-05-12 Thread David Freeman


 > How do I generate gif inline images using PHP's image 
 > functions using GD libs.  Everything I have seen so far 
 > requires a header before generating the image.  But I want 
 > the image embedded into a table with other texts.  Thank you 
 > for the help.

Write the php to generate the image as a separate file.  Then call that
file from an image tag.

Eg. 

CYA, Dave



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Generate inline image

2002-05-12 Thread Martin Towell

HTML docs only contain text. If you want images "inline" then you use the
 tag.

-Original Message-
From: Justin French [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 13, 2002 10:31 AM
To: [EMAIL PROTECTED]; php
Subject: Re: [PHP] Generate inline image


Your  tag calls a script (imagemaker.php) which generates the image for
you the parent script (eg home.php) doesn't generate the image inline,
to the best of my knowledge.

Justin French


on 13/05/02 10:01 AM, Engineering Software Center
([EMAIL PROTECTED]) wrote:

> 
> Hi:
> How do I generate gif inline images using PHP's image functions using GD
> libs.  Everything I have seen so far requires a header before generating
> the image.  But I want the image embedded into a table with other
> texts.  Thank you for the help.
> 
> Frank
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Generate inline image

2002-05-12 Thread Justin French

Your  tag calls a script (imagemaker.php) which generates the image for
you the parent script (eg home.php) doesn't generate the image inline,
to the best of my knowledge.

Justin French


on 13/05/02 10:01 AM, Engineering Software Center
([EMAIL PROTECTED]) wrote:

> 
> Hi:
> How do I generate gif inline images using PHP's image functions using GD
> libs.  Everything I have seen so far requires a header before generating
> the image.  But I want the image embedded into a table with other
> texts.  Thank you for the help.
> 
> Frank
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Generate inline image

2002-05-12 Thread Engineering Software Center


Hi:
How do I generate gif inline images using PHP's image functions using GD
libs.  Everything I have seen so far requires a header before generating
the image.  But I want the image embedded into a table with other
texts.  Thank you for the help.

Frank


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php