I have found that in some presets adding an action that scales the width and not the height causes the following error:

* warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in /home/buddyh5/public_html/sites/all/modules/imageapi/imageapi_gd.module on line 130.
* warning: imagecopyresampled(): supplied argument is not a valid Image resource in /home/buddyh5/public_html/sites/all/modules/imageapi/imageapi_gd.module on line 63.
* recoverable fatal error: Object of class stdClass could not be converted to string in /home/buddyh5/public_html/includes/bootstrap.inc on line 667.
* warning: preg_match() expects parameter 2 to be string, object given in /home/buddyh5/public_html/includes/bootstrap.inc on line 670.
* warning: preg_match() expects parameter 2 to be string, array given in /home/buddyh5/public_html/includes/bootstrap.inc on line 670.

This error goes away when I set the scale only to the height.

I went to line 63 of the image api module and found this argument $image->info['width'], I have the sense that this must have something to do with it.

Comments

marcoBauli’s picture

true. Warning: preg_match() disappears if setting only height in 'scale and crop'

hmm..it's here again

drewish’s picture

Status: Active » Closed (duplicate)

i think this is really an imageapi problem: #269160: Error when scaling by width only

abu3abdalla’s picture

yes i have this problem too and i did not found how to solve it ?