Try to specify absolute path to the jpeg - possible php do not look up for
jpeg in current folder...
(or use './image.jpg')
Zliy Pes, http://zliypes.com.ua
- Original Message -
From: Miguel Loureiro [EMAIL PROTECTED]
To: php-gen [EMAIL PROTECTED]
Sent: Tuesday, December 04, 2001 8:46 PM
Subject: [PHP] mad again jpeg files...
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 .
a.
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]
--
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]