also, are you sure both versions of php were compiled the same way with the
same options and support?

-----Original Message-----
From: Johan Holst Nielsen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 04, 2001 9:22 AM
To: Miguel Loureiro; [EMAIL PROTECTED]
Subject: Re: [PHP] problem with ImageCreateJPEG ...


>
>
>sorry for taking your time, but I still dont understand why I got errors
with
>pjeg...
>I use the following code on other machine with jpeg support to , and it
works,
>while in my machine I got an empty jpeg file
><?
> Header("Content-type: image/jpeg");
> $im=ImageCreate(400,200);
> $bcg  = ImageColorAllocate($im,240,240,240);
> $prt  = ImageColorAllocate($im,0,0,0);
> $rd   = ImageColorAllocate($im,255,0,0);
> ImageFill($im,400,200,$bcg);
> ImageLine($im,110,85,280,85,$rd);
> ImageString($im,5,130,90,"--- OK ---",$prt);
> ImageLine($im,110,110,280,110,$rd);
> ImageJPEG($im,"a.jpg");
>?>
><html>
><body>
><img src="a.jpg">
></body>
></html>
>
Try to remove all html, and instead make a ImageJPEG($img);

You should then only get the JPEG file?

You set a header, and the browser doesn't understand the HTML...

regards
Johan


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to