Page 1 of 1

PHP and GD -> Related problem

Posted: Tue Sep 16, 2003 3:43 am
by harsha
Hi
all

I am facing a problem in storing the thumbnail generated using the GD Bundle

the
imagejpeg($image,"/photos/thumb/thumb1.jpg",7);
is not creating the thumb image file

I am using Redhat 9 os
I feel that the default permission of the directory has to be changed

can any one plz tell what may be the problem

Posted: Tue Sep 16, 2003 4:13 am
by pootergeist
call the file in a browser and tell us the parse error return.

If it is a permission denied then chmod the /thumb/ directory to allow write and execute at the least.

Also - increase the third parameter of the imagejpeg call to somewhere in the 80-90 region as 7 will not create a full image.
Anything below about 40(%) quality will result in the lower part of the image being reduced to grey blocks due to the composer running out of filesize before completion. I tend toward 85 or 90 for thumbnails as a happy balance of quality vs filesize.

Posted: Tue Sep 16, 2003 8:20 am
by Wayne
if it is
call to undefined function imagejpeg()
it means your version of GD libraries doesnt support JPEGand you will need to install the jpeg-6b libraries, look in the manual.

it could be several things so let us know what the error messages are.

Posted: Tue Sep 16, 2003 9:34 am
by toms100
imagecreatefromjpeg() might work
a word of warning though: if it is a true colour image then due to bugs in php (at least on myserver) you cannot specify a text colour unless it is in the image!

Posted: Tue Sep 16, 2003 2:03 pm
by pootergeist
What build are you using toms100 ? just out of curiosity.

Posted: Tue Sep 16, 2003 10:54 pm
by harsha
I am using the GD bundle that comes with Redhat 9 i haven't tried to install a new one i think it is GD 2.XXXX