Active
Project:
ImageAPI
Version:
6.x-1.6
Component:
ImageAPI GD
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Nov 2009 at 17:42 UTC
Updated:
17 Sep 2014 at 17:08 UTC
Jump to comment: Most recent
(Running Drupal 6.14 on a LAMP server, PHP5.2.11.
phpinfo() shows GD version as 'bundled (2.0.34 compatible)' with PNG support enabled.)
I notice this issue with imagecache but I think it's an ImageAPI GD issue. If I try to save a preset it gives me the following errors (I think as a result of trying to manipulate the PNG sample):
* warning: imagecreatefrompng() [function.imagecreatefrompng]: gd-png: fatal libpng error: [00][00][00][00]: unknown critical chunk in /xxxxxxxxx/sites/all/modules/imageapi/imageapi_gd.module on line 44.
* warning: imagecreatefrompng() [function.imagecreatefrompng]: gd-png error: setjmp returns error condition in /xxxxxxxxx/sites/all/modules/imageapi/imageapi_gd.module on line 44.
* warning: imagecreatefrompng() [function.imagecreatefrompng]: 'sites/default/files/imagecache_sample.png' is not a valid PNG file in /xxxxxxxxx/sites/all/modules/imageapi/imageapi_gd.module on line 44.
Also, if I try to upload a PNG image into an image field, it says 'An image thumbnail was not able to be created.'
The issue appears to be restricted only to PNGs.
This issue may have something to do with it?
Comments
Comment #1
mmbee888 commentedit happens to me too using 6.15 and uninstall all the imagecache modules and reinstall them again will work. Weird!!! Hope they look into the problems.
Comment #2
hnln commentedsubscribe (I have the same problem):
GD library undled (2.0.34 compatible)
I do have a GD Memory Limit warning, I'll update if increasing it resolves anything.
Comment #3
webfunkin commentedI have the same problem.
using drupal 6.20.
PHP 5.2.13
GD - bundled (2.0.34 compatible)
Php memory limit - 128M
error :
warning: imagecreatefrompng() [function.imagecreatefrompng]: gd-png: fatal libpng error: Read Error: truncated data in xxxx/sites/default/modules/imageapi/imageapi_gd.module on line 44.
warning: imagecreatefrompng() [function.imagecreatefrompng]: gd-png error: setjmp returns error condition in xxxx/sites/default/modules/imageapi/imageapi_gd.module on line 44.
warning: imagecreatefrompng() [function.imagecreatefrompng]: 'sites/default/files/rick.png' is not a valid PNG file in xxxx/whackkc1/public_html/sites/default/modules/imageapi/imageapi_gd.module on line 44.
please do look into it
Comment #4
hejazee commentedI had the same problem.
imagecreatefrompng() [function.imagecreatefrompng]: 'sites/default/files/imagecache_sample.png' is not a valid PNG file in /home/.../sites/all/modules/imageapi/imageapi_gd.module on line 59.
imagecreatefrompng() [function.imagecreatefrompng]: 'sites/default/files/imagecache_sample.png' is not a valid PNG file in /home/.../sites/all/modules/imageapi/imageapi_gd.module on line 59.
But I solved it by deleting and re-uploading the sample.png file at this location:
sites/default/files/imagecache_sample.png
That file was corrupted and hadn't been uploaded successfully to my server.
Some of its pixels were damaged.
Comment #5
danesta commentedAfter hours of trial and error I stumbled across this thread and can confirm that #4 worked for me, thanks!
Comment #6
HeathN commentedCan confirm that #4 works, but this is not a solution. Also this is an issue in 7.x as well.