Using imagefield, imagecache and imageapi, I am seeing multiple warnings and notices the first time a node page is viewed. After this (i.e. after thumbnails have been created) there are no further warning messages.

    * warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in /sites/all/modules/imageapi/imageapi_gd.module on line 158.
    * warning: imagealphablending(): supplied argument is not a valid Image resource in /sites/all/modules/imageapi/imageapi_gd.module on line 162.
    * warning: imagesavealpha(): supplied argument is not a valid Image resource in /sites/all/modules/imageapi/imageapi_gd.module on line 163.
    * notice: Undefined variable: color in /sites/all/modules/imageapi/imageapi_gd.module on line 176.
    * notice: Undefined variable: color in /sites/all/modules/imageapi/imageapi_gd.module on line 176.
    * notice: Undefined variable: color in /sites/all/modules/imageapi/imageapi_gd.module on line 176.
    * warning: imagecolorallocate(): supplied argument is not a valid Image resource in /sites/all/modules/imageapi/imageapi_gd.module on line 176.
    * warning: imagecolorallocate(): supplied argument is not a valid Image resource in /sites/all/modules/imageapi/imageapi_gd.module on line 178.
    * warning: imagefill(): supplied argument is not a valid Image resource in /sites/all/modules/imageapi/imageapi_gd.module on line 180.
    * warning: imagecolortransparent(): supplied argument is not a valid Image resource in /sites/all/modules/imageapi/imageapi_gd.module on line 182.
    * warning: imagecopyresampled(): supplied argument is not a valid Image resource in /sites/all/modules/imageapi/imageapi_gd.module on line 85.
    * warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in /sites/all/modules/imageapi/imageapi_gd.module on line 158.
    * warning: imagealphablending(): supplied argument is not a valid Image resource in /sites/all/modules/imageapi/imageapi_gd.module on line 162.
    * warning: imagesavealpha(): supplied argument is not a valid Image resource in /sites/all/modules/imageapi/imageapi_gd.module on line 163.
    * notice: Undefined variable: color in /sites/all/modules/imageapi/imageapi_gd.module on line 176.
    * notice: Undefined variable: color in /sites/all/modules/imageapi/imageapi_gd.module on line 176.
    * notice: Undefined variable: color in /sites/all/modules/imageapi/imageapi_gd.module on line 176.
    * warning: imagecolorallocate(): supplied argument is not a valid Image resource in /sites/all/modules/imageapi/imageapi_gd.module on line 176.
    * warning: imagecolorallocate(): supplied argument is not a valid Image resource in /sites/all/modules/imageapi/imageapi_gd.module on line 178.
    * warning: imagefill(): supplied argument is not a valid Image resource in /sites/all/modules/imageapi/imageapi_gd.module on line 180.
    * warning: imagecolortransparent(): supplied argument is not a valid Image resource in /sites/all/modules/imageapi/imageapi_gd.module on line 182.
    * warning: imagecopyresampled(): supplied argument is not a valid Image resource in /sites/all/modules/imageapi/imageapi_gd.module on line 85.

I'll do some further debugging on this issue when I get a chance.

CommentFileSizeAuthor
#2 imageapi-gd-warnings.patch1.56 KBmfb

Comments

drewish’s picture

almost seems like the initial open is failing but it's still trying to manipulate the image... let me know what you figure out.

mfb’s picture

Status: Active » Needs review
StatusFileSize
new1.56 KB

I found a couple issues, one is that image dimensions could get rounded down to zero pixels, which causes all sorts of unhappiness/warnings. The notices were caused by an apparent typo with the $color variable.

drewish’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev

looks good. need to put this into HEAD first then backport to 6.x

mfb’s picture

patch applies on head (although with an offset)

drewish’s picture

Status: Needs review » Fixed

thanks, committed to HEAD and DRUPAL-6--1.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.