From: Miguel Carvalho <miguel@ipatimup.pt>
To: arun@library.iisc.ernet.in
Cc: pgsql-php@postgresql.org
Subject: Re: How to display an image (Image generation)
Date: Wed, 25 Sep 2002 10:02:35 +0100 (WEST)
Message-ID: <5854.213.13.176.13.1032944555.squirrel@www.ipatimup.up.pt> (raw)
In-Reply-To: <Pine.BSO.4.44.0209251422200.25879-100000@library.iisc.ernet.in>
References: <Pine.BSO.4.44.0209251422200.25879-100000@library.iisc.ernet.in>
Hi,
> I am using the code
> <?php
> Header("Content-type: image/gif");
> $image = ImageCreate(100,50);
> $black = ImageColorAllocate($image,0,0,0);
> $white = ImageColorAllocate($image,255,255,255);
> ImageArc($image,50,25,48,0,$white);
> ImageGif($image);
> Imagedestroy($image);
> ?>
> to display an image but the code is not working. how shud the code be
> and do i need to enable any libraries to do this. i have to get an
> image and get the midpoint(xy coordinate) of that image . how do i do
> that. if i run the above code i won't get any error but nothing will be
> displayed. how do i do this.
The previous code seams fine to me.
What version of GD are you using? If it's 1.6, as said in PHP docs
"Note: Since all GIF support was removed from the GD library in version
1.6, this function is not available if you are using that version of the
GD library."
there wont be gif support.
Have you tried the same code using other formats, like jpeg, png?
Try sending the output to a file( use the second optional parameter to
imagegif, imagejpeg, etc) and check the file size.
Miguel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: miguel@ipatimup.pt, arun@library.iisc.ernet.in
Subject: Re: How to display an image (Image generation)
In-Reply-To: <5854.213.13.176.13.1032944555.squirrel@www.ipatimup.up.pt>
References: <Pine.BSO.4.44.0209251422200.25879-100000@library.iisc.ernet.in> <5854.213.13.176.13.1032944555.squirrel@www.ipatimup.up.pt>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox