Hello all,
I still having problem when use jpeg functions...

I got:  " testout.jpg is not a valid JPEG file in .." , with follow
code:
 Header("Content-type: image/jpeg");
 $img=ImageCreateFromJPEG("testout.jpg");
 ImageJPEG($img,"a.jpg");
 ImageDestroy($img);

testout.jpg was one image created by jpeg-6b after make test,   I see
image directly in browser
(machine_name/directory/where/have/code/testout.jpg) the image, my
phpinfo gives me information that gd had support for jpeg enabled .... I
try with other *.jpeg files .... I try this code:

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");
ImageDestroy($im);

and the result was an empty a.jpg file .....
aaaaaaaaaaaaaaaaaaaaaaaaaaaaa.

If anyone has any idea ...
I already dont know what to do ....
T.Y.
--
Best Regards
Miguel Joaquim Rodrigues Loureiro


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