Valentim said:
"Try to specify absolute path to the jpeg - possible php do not look up
for
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
the
same options and support?" ---

well , in my machine configure command ( where jpeg support dont work) I
have :
  './configure' '--with-mysql'
 '--with-apache=/usr/src/packages/SOURCES/apache_1.3.9/'
 '--with-zlib-dir=/usr/src/packages/SOURCES/zlib/'
 '--with-png-dir=/usr/src/packages/SOURCES/libpng/'
 '--with-jpeg-dir=/usr/src/packages/SOURCES/jpeg-6b/'
 '--with-gd=/usr/src/packages/SOURCES/gd'
 '--enable-track-vars'

in other machine ( where jpeg works fine ....) I have :
 './configure' '--with-mysql=/usr/local/mysql/'
'--with-gd=/share/tmp/gd-1.8.4/'
 '--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'
 '--with-apache=/usr/src/apache_1.3.19/'


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 .... )
T.Y.



> 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