Reply to Re: Error in creating JPEG image from source.

Re: Error in creating JPEG image from source. new!
by dreamer, 12 years, 5 months ago
Dear colin ,thanks a lot.

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.Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important