#29878 [Bgs]: ImageCreateFromJpeg returns 'not a valid jpeg file'

2004-10-06 Thread cyleriggs at kc dot rr dot com
 ID:   29878
 User updated by:  cyleriggs at kc dot rr dot com
 Reported By:  cyleriggs at kc dot rr dot com
 Status:   Bogus
 Bug Type: GD related
 Operating System: Linux 2.6.8.1
 PHP Version:  5.0.1
 Assigned To:  pajoye
 New Comment:

Okay, so how about a feature suggestion than, i think that there should
be the option in GD that allows you to try and open images that have a
few corrupted bytes. If other programs can open them just fine what
would be the harm in allowing programmers to choose to live with the
corruptions?


Previous Comments:


[2004-10-05 09:33:47] [EMAIL PROTECTED]

PHP only reads non-coprrupted files - there is no bug here.



[2004-10-05 04:34:39] cyleriggs at kc dot rr dot com

After playing around with the images themselves i have found that
converting them from jpeg to png then back to jpeg fixed the problem
and yielded no quality loss. I used the linux tool set called
ImageMagick to do this. I wrote a short perl script to go through all
my images and fix them. Other than this i have found no other way of
stopping this. one interesting fact though is that while converting the
images with the imagemagick utility it complained about some
corruptions, however it was still able to open them fine and convert
them. Maybe PHP is being too picky about the images that it opens as
despite a few corrupted bytes EVERYthing was able to open these images
except for PHP.



[2004-09-30 21:05:50] paul at gslip dot com

I disagree. I have used my code successfully on montypics.com until the
upgrade to php 5.0.1. I now get exactly the same results as the original
poster.
Images that worked fine on previous versions now do not. I have a
sample image that can be provided. I also have code I can share with
the PHP team although I cannot post it here as it is lengthy and
copyrighted.



[2004-08-29 12:22:14] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Your jpeg file is not valid. PHP could not take care of each possible
failures in image files. Desktop softwares could. Fix your image and
replace it.

--Pierre




[2004-08-28 23:00:25] cyleriggs at kc dot rr dot com

Description:

When calling ImageCreateFromJPEG() on a valid jpeg file it fails and i
get errors such as the following in my php error log:

code
[28-Aug-2004 05:21:29] PHP Warning:  imagecreatefromjpeg() [a
href='function.imagecreatefromjpeg'function.imagecreatefromjpeg/a]:
'/usr/local/apache2/htdocs/pictures/Before Dad Went to
Iraq/IMGP0008.JPG' is not a valid JPEG file in
/home/www/pictures/index.php on line 43
/code

however as can be seen through this link the file is a valid jpeg
file:

http://cyle.dyndns.org/pictures/Before Dad Went to Iraq/IMGP0008.JPG

Also i have a memory_limit of 25mb so this cannot be the issue.

Something that might help:
http://cyle.dyndns.org/phpinfo.php

I am writing this code for a picture gallery browser, while most
pictures load, about 10% of my pictures cannot be opened through
ImageCreateFromJpeg(), however it is always the same pictures that
cannot be opened. The only trend i can see is that this does not appear
to be happening on small jpegs.

The page that I am having problems with is
http://cyle.dyndns.org/pictures/index.php.  The source code for this is
at http://cyle.dyndns.org/pictures/index.phps.

Expected result:

The image would be loaded and code continue to execute and i get the
error message described above.

Actual result:
--
Sometimes images load sometimes images cannot be opened.





-- 
Edit this bug report at http://bugs.php.net/?id=29878edit=1


#29878 [Bgs-Opn]: ImageCreateFromJpeg returns 'not a valid jpeg file'

2004-10-04 Thread cyleriggs at kc dot rr dot com
 ID:   29878
 User updated by:  cyleriggs at kc dot rr dot com
 Reported By:  cyleriggs at kc dot rr dot com
-Status:   Bogus
+Status:   Open
 Bug Type: GD related
 Operating System: Linux 2.6.8.1
 PHP Version:  5.0.1
 Assigned To:  pajoye
 New Comment:

After playing around with the images themselves i have found that
converting them from jpeg to png then back to jpeg fixed the problem
and yielded no quality loss. I used the linux tool set called
ImageMagick to do this. I wrote a short perl script to go through all
my images and fix them. Other than this i have found no other way of
stopping this. one interesting fact though is that while converting the
images with the imagemagick utility it complained about some
corruptions, however it was still able to open them fine and convert
them. Maybe PHP is being too picky about the images that it opens as
despite a few corrupted bytes EVERYthing was able to open these images
except for PHP.


Previous Comments:


[2004-09-30 21:05:50] paul at gslip dot com

I disagree. I have used my code successfully on montypics.com until the
upgrade to php 5.0.1. I now get exactly the same results as the original
poster.
Images that worked fine on previous versions now do not. I have a
sample image that can be provided. I also have code I can share with
the PHP team although I cannot post it here as it is lengthy and
copyrighted.



[2004-08-29 12:22:14] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

Your jpeg file is not valid. PHP could not take care of each possible
failures in image files. Desktop softwares could. Fix your image and
replace it.

--Pierre




[2004-08-28 23:00:25] cyleriggs at kc dot rr dot com

Description:

When calling ImageCreateFromJPEG() on a valid jpeg file it fails and i
get errors such as the following in my php error log:

code
[28-Aug-2004 05:21:29] PHP Warning:  imagecreatefromjpeg() [a
href='function.imagecreatefromjpeg'function.imagecreatefromjpeg/a]:
'/usr/local/apache2/htdocs/pictures/Before Dad Went to
Iraq/IMGP0008.JPG' is not a valid JPEG file in
/home/www/pictures/index.php on line 43
/code

however as can be seen through this link the file is a valid jpeg
file:

http://cyle.dyndns.org/pictures/Before Dad Went to Iraq/IMGP0008.JPG

Also i have a memory_limit of 25mb so this cannot be the issue.

Something that might help:
http://cyle.dyndns.org/phpinfo.php

I am writing this code for a picture gallery browser, while most
pictures load, about 10% of my pictures cannot be opened through
ImageCreateFromJpeg(), however it is always the same pictures that
cannot be opened. The only trend i can see is that this does not appear
to be happening on small jpegs.

The page that I am having problems with is
http://cyle.dyndns.org/pictures/index.php.  The source code for this is
at http://cyle.dyndns.org/pictures/index.phps.

Expected result:

The image would be loaded and code continue to execute and i get the
error message described above.

Actual result:
--
Sometimes images load sometimes images cannot be opened.





-- 
Edit this bug report at http://bugs.php.net/?id=29878edit=1


#29878 [NEW]: ImageCreateFromJpeg returns 'not a valid jpeg file'

2004-08-28 Thread cyleriggs at kc dot rr dot com
From: cyleriggs at kc dot rr dot com
Operating system: Linux 2.6.8.1
PHP version:  5.0.1
PHP Bug Type: GD related
Bug description:  ImageCreateFromJpeg returns 'not a valid jpeg file'

Description:

When calling ImageCreateFromJPEG() on a valid jpeg file it fails and i get
errors such as the following in my php error log:

code
[28-Aug-2004 05:21:29] PHP Warning:  imagecreatefromjpeg() [a
href='function.imagecreatefromjpeg'function.imagecreatefromjpeg/a]:
'/usr/local/apache2/htdocs/pictures/Before Dad Went to Iraq/IMGP0008.JPG'
is not a valid JPEG file in /home/www/pictures/index.php on line 43
/code

however as can be seen through this link the file is a valid jpeg file:

http://cyle.dyndns.org/pictures/Before Dad Went to Iraq/IMGP0008.JPG

Also i have a memory_limit of 25mb so this cannot be the issue.

Something that might help:
http://cyle.dyndns.org/phpinfo.php

I am writing this code for a picture gallery browser, while most pictures
load, about 10% of my pictures cannot be opened through
ImageCreateFromJpeg(), however it is always the same pictures that cannot
be opened. The only trend i can see is that this does not appear to be
happening on small jpegs.

The page that I am having problems with is
http://cyle.dyndns.org/pictures/index.php.  The source code for this is at
http://cyle.dyndns.org/pictures/index.phps.

Expected result:

The image would be loaded and code continue to execute and i get the error
message described above.

Actual result:
--
Sometimes images load sometimes images cannot be opened.

-- 
Edit bug report at http://bugs.php.net/?id=29878edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=29878r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29878r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29878r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=29878r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=29878r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=29878r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=29878r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=29878r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=29878r=support
Expected behavior:   http://bugs.php.net/fix.php?id=29878r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=29878r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=29878r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=29878r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=29878r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=29878r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=29878r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=29878r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=29878r=float