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.
more info about the class
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.