Well, check the error.  Get rid of the header() call and just look at the 
output.

On Thu, 27 Mar 2003, Reuben D. Budiardja wrote:

> 
> Hello,
> I have a script that creates image using the gd library that is bundled with 
> the latest php-4.0.3 on Redhat Linux / Apache as apache mod. Everything works 
> fine when I use png:
> 
> header("Content-type: image/png");
> $im = imagecreate(500,500);
> ...[script]...
> imagepng($im)
> 
> Then when I try to display it as jpeg by changing the header and the last line 
> as follows:
> 
> header("Content-type: image/jpeg");
> $im = imagecreate(500,500);
> ...[script]...
> imagejpeg($im)
>  
> It gives:
> 
> The image "http://localhost/astr162/wedgeplot.php"; cannot be displayed, 
> because it contains errors.
> 
> The question is, is the GD lib that is bundled with php has JPEG support ?
> If yes, what might cause this error?
> 
> Thanks a lot. Any help is appreciated.
> RDB
> 
> 
> 


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

Reply via email to