Forum Moderators: coopster

Message Too Old, No Replies

imagecreatefromjpeg

Works for some jpg but not others

         

OSUsammy13

1:13 am on May 5, 2004 (gmt 0)

10+ Year Member



I am using GD and imagecreatefromjpeg to make thumbnails of larger images. For some reason, the function works well with some images but the images that my friend uploaded do not work at all. I get an error that "not a valid JPEG file".

Does anyone know if this function only supports certain sizes or types of jpgs?

jatar_k

2:14 am on May 5, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



are you sure it is actually a jpg?

I assume you have already read through the user notes etc here
[ca2.php.net...]

OSUsammy13

4:28 pm on May 5, 2004 (gmt 0)

10+ Year Member



I am sure it is a JPG in that I have opened the file and then resaved it using Fireworks to verify that it was the correct file type.
However - I did take the file, resize it to be smaller and then it seems to work fine.

I read over the PHP definition of the function and none of the posts seem to apply to my problem.

jatar_k

6:01 pm on May 5, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



you may have hit the upload_max_filesize

Handling File Uploads [ca2.php.net]

try looking through pnp.ini for your upload settings