>
>
>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]

Reply via email to