Valentim said:
"Try to specify absolute path to the jpeg - possible php do not look up
jpeg in current folder... (or use './image.jpg') "   - but the image.jpg
created had file size=0     ....

Johan Holst Nielsen said:
"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..." - yes
I tried .........

Jack Dempsey said:
"also, are you sure both versions of php were compiled the same way with
same options and support?" ---

well , in my machine configure command ( where jpeg support dont work) I
have :
  './configure' '--with-mysql'

in other machine ( where jpeg works fine ....) I have :
 './configure' '--with-mysql=/usr/local/mysql/'
 '--with-zlib-dir=/usr/local/lib/' '--with-jpeg-dir=/share/tmp/jpeg-6b/'

 '--with-png-dir=/share/tmp/libpng-1.0.11/' '--enable-track-vars'

its amazing......

thanks the effort , time, calm, help, that you had with me .
if someone have more ideas, please, I start being crazy ( ... yes, yes,
I'm crazy since I was born .... )

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