class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
It looks to me like the version of libjpeg on your system reports the file as being erroneous. GD, which uses libjpeg then discards the image as invalid.
I am not too sure how you could solve the problem, but in any case, it is a libjpeg/GD issue, and not a class issue. Try to update your system, or even downgrade libjpeg or GD (for instance, your files work on GD 2.0 on my box).Reply
Re: Error in creating JPEG image from source. new!
My PHP Version 5.3.8 GD Version:bundled (2.0.34 compatible)
I try to run the code:
$src = imagecreatefromjpeg("sample.jpg");
It doesn't work and returns:
Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: gd-jpeg, libjpeg: recoverable error: Corrupt JPEG data: 2478 extraneous bytes before marker 0xd9 in...
Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: 'sample.jpg' is not a valid JPEG file in...
But the code works when I re-save the image(Size become 2.67M)
I am confused now.
I am not too sure how you could solve the problem, but in any case, it is a libjpeg/GD issue, and not a class issue. Try to update your system, or even downgrade libjpeg or GD (for instance, your files work on GD 2.0 on my box).
please help