When visiting nodes with image assist (in particular, story nodes) I get the following message:

Unable to create img_assist_custom image

This triggers a series of messages in my watchdog table:

imagegif(): Unable to open 'files/museum_th.gif' for writing in /home/gov/mysite/WWW/includes/image.inc on line 300.

imagedestroy(): supplied argument is not a valid Image resource in /home/gov/mysite/WWW/includes/image.inc on line 229.

imagegif(): supplied argument is not a valid Image resource in /home/gov/mysite/WWW/includes/image.inc on line 300.

imagecopyresampled(): supplied argument is not a valid Image resource in /home/gov/mysite/WWW/includes/image.inc on line 226.

imagecreatetruecolor(): Invalid image dimensions in /home/gov/mysite/WWW/includes/image.inc on line 225.

I have tried updating the max size of images on the img_assist settings page, but this doesn't resolve anything. I am using img_assist.module,v 1.56.2.6 2006/06/16 17:33:15 bjshell Exp.

I have also tried Crunchywelch's patch here: http://drupal.org/node/60771

Img_assist was working. I'm not sure what has gone wrong.

Comments

bomarmonk’s picture

I figured out what this behavior is linked to: these errors only happen if the image size is edited within the tinymce window (dragging the corners of the image to make it larger). Doing this type of edit, saving the node, and then viewing the node produces the above problems. This is with a fresh install of all the latest files from 4.7 version of the img_assist module (could be some database problem?) Help, please!

benshell’s picture

Does the image toolkit you're using support GIF? I know older versions of GD2 did not, because of a legal issue with GIFs.

Also, does img_assist work if you go into the settings and turn off custom image resizing (three checkboxes)?

bomarmonk’s picture

It looks like unchecking those check boxes resolves the issue. So these errors are definitely a problem with custom sizing of images.

bomarmonk’s picture

However, it looks like I still get the same errors with flexinode inline images...

bomarmonk’s picture

I think I have narrowed this down to a problem with flexinode, not story nodes. Please see the following problem report at the flexinode project:
http://drupal.org/node/70923

Or is this a problem with how img_assist is behaving?

bomarmonk’s picture

The snippet here seems to get past this issue to a point (images now display in flexinode text areas).

However, error messages still appear: perhaps related to the fact that these are gif files and are not supported properly on the server???

See this snippet to fix inline images with flexinode text areas:
http://drupal.org/node/45491

Boinng’s picture

This problem isn't limited to flexinode - I've never had that installed, but I am getting the warning messages above about image.inc, and I'm also having the "no display in original resolution" problem. Crunchywelch's patch has no effect. What's going on?

darren oh’s picture

Status: Active » Closed (won't fix)

Assuming this is a problem with GIF image type. Maybe it will work better if you use the imagemagick toolkit instead of GD. Nothing we can do here.

manuj_78’s picture

Status: Closed (won't fix) » Active

I am facing similar problem but my images are jpeg and not gif

sun’s picture

Status: Active » Postponed (maintainer needs more info)

Please supply further information about installed modules, versions, filesystem permissions, PHP version, aso.

sun’s picture

Status: Postponed (maintainer needs more info) » Fixed

Please upgrade to the latest versions of Drupal 4.7, Image and Image Assist modules. You might also consider upgrading to Drupal 5. Support for Image Assist 4.7.x is discontinued.

Anonymous’s picture

Status: Fixed » Closed (fixed)