Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 742D54763C9 for ; Wed, 25 Sep 2002 05:37:48 -0400 (EDT) Received: from mail.ipatimup.pt (peterpan.ipatimup.pt [194.65.114.74]) by postgresql.org (Postfix) with ESMTP id 4E837475B8D for ; Wed, 25 Sep 2002 05:37:46 -0400 (EDT) Received: from ipatimup.pt (localhost [127.0.0.1]) by mail.ipatimup.pt (8.11.6/IPATIMUP) with SMTP id g8P92Y418559; Wed, 25 Sep 2002 10:02:34 +0100 X-RAV-AntiVirus: This e-mail has been scanned for viruses on host: mail.ipatimup.pt Received: from 213.13.176.13 (proxying for 10.20.110.138) (SquirrelMail authenticated user miguel) by www.ipatimup.up.pt with HTTP; Wed, 25 Sep 2002 10:02:35 +0100 (WEST) Message-ID: <5854.213.13.176.13.1032944555.squirrel@www.ipatimup.up.pt> Date: Wed, 25 Sep 2002 10:02:35 +0100 (WEST) Subject: Re: How to display an image (Image generation) From: "Miguel Carvalho" To: In-Reply-To: References: X-Priority: 3 Importance: Normal X-MSMail-Priority: Normal Cc: Reply-To: miguel@ipatimup.pt X-Mailer: SquirrelMail (version 1.2.6) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/52 X-Sequence-Number: 1507 Hi, > I am using the code > 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