Received the following error messages when I tried to switch to a different theme color:

warning: imagecreatefrompng() [function.imagecreatefrompng]: gd-png: fatal libpng error: x[DA][EC]R: invalid chunk type in /public_html/modules/color/color.module on line 374.
warning: imagecreatefrompng() [function.imagecreatefrompng]: gd-png error: setjmp returns error condition in /public_html/modules/color/color.module on line 374.
warning: imagecreatefrompng() [function.imagecreatefrompng]: 'themes/pixture//color/base.png' is not a valid PNG file in /public_html/modules/color/color.module on line 374.

Is there a bug in libpng? If so, is there any workaround since I have no control of which version libpng runs on the server.

Comments

Jeff Burnz’s picture

Well I'd be most interested to see what comes of this, wondering if this is more to do with gd lib on your specific version of php - maybe its not the bundled version? whats phpinfo(); telling you - png support enabled?

On a complete outside bet I might try running base.png through OptiPNG and see what may...

sunfish’s picture

from phpinfo:

GD Support enabled
GD Version bundled (2.0.34 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.3.7
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled

Since August release of libpng 1.2.31 fixes a cHRM-reading bug introduced in 1.2.30 and reverts the png_flush() behavior, I thought 1.2.30 might be the culprit. But then I have no way to confirm this without trying out a different version of libpng.

wileee’s picture

I just did a new install and have had the same issue (only with many more error messages). I just gave up on it for a while but now when I go back into the themes to configure anything the entire color adjustment settings are missing.