I just installed the module, put the "adaptive" effect in the style
and i clicked save effect i get all this

Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in image_gd_create_tmp() (line 302 of /home/tscode5/public_html/modules/system/image.gd.inc).
Warning: imagealphablending(): supplied argument is not a valid Image resource in image_gd_create_tmp() (line 319 of /home/tscode5/public_html/modules/system/image.gd.inc).
Warning: imagecolorallocatealpha(): supplied argument is not a valid Image resource in image_gd_create_tmp() (line 320 of /home/tscode5/public_html/modules/system/image.gd.inc).
Warning: imagefill(): supplied argument is not a valid Image resource in image_gd_create_tmp() (line 321 of /home/tscode5/public_html/modules/system/image.gd.inc).
Warning: imagealphablending(): supplied argument is not a valid Image resource in image_gd_create_tmp() (line 322 of /home/tscode5/public_html/modules/system/image.gd.inc).
Warning: imagesavealpha(): supplied argument is not a valid Image resource in image_gd_create_tmp() (line 323 of /home/tscode5/public_html/modules/system/image.gd.inc).
Warning: imagecopyresampled(): supplied argument is not a valid Image resource in image_gd_resize() (line 86 of /home/tscode5/public_html/modules/system/image.gd.inc).

not sure whats up
any help?

Comments

missmobtown’s picture

Same issue here, though curiously, the image resizing seems to work just fine on Views pages (using Views slideshow) but chokes on a custom content type I have set up (also using Views slideshow). Any insight as to why the difference?

wojcieszek’s picture

same problem same lines at setting up first image style.

atorockio’s picture

Title: Failed at first setup » Failed at first setup caused by change to core image module

Hello, I have the adaptive image module installed on a site running Drupal 7.9 and it works fine. I just encountered this problem (exactly the same as the original poster) when I tried to use this module with Drupal 7.12.

I believe this issue is caused by changes in image_scale_effect() in image.effects.inc in the core image module.

In D7.9:

function image_scale_effect(&$image, $data) {
  // Set sane default values.
  $data += array(
    'upscale' => FALSE,
  );

  // Set impossibly large values if the width and height aren't set.
  $data['width'] = empty($data['width']) ? PHP_INT_MAX : $data['width'];
  $data['height'] = empty($data['height']) ? PHP_INT_MAX : $data['height'];

  if (!image_scale($image, $data['width'], $data['height'], $data['upscale'])) {
    watchdog('image', 'Image scale failed using the %toolkit toolkit on %path (%mimetype, %dimensions)', array('%toolkit' => $image->toolkit, '%path' => $image->source, '%mimetype' => $image->info['mime_type'], '%dimensions' => $image->info['width'] . 'x' . $image->info['height']), WATCHDOG_ERROR);
    return FALSE;
  }
  return TRUE;
}

In D7.12:

function image_scale_effect(&$image, $data) {
  // Set sane default values.
  $data += array(
    'width' => NULL,
    'height' => NULL,
    'upscale' => FALSE,
  );

  if (!image_scale($image, $data['width'], $data['height'], $data['upscale'])) {
    watchdog('image', 'Image scale failed using the %toolkit toolkit on %path (%mimetype, %dimensions)', array('%toolkit' => $image->toolkit, '%path' => $image->source, '%mimetype' => $image->info['mime_type'], '%dimensions' => $image->info['width'] . 'x' . $image->info['height']), WATCHDOG_ERROR);
    return FALSE;
  }
  return TRUE;
}

In the old version $data['width'] and $data['height'] were set to an "impossibly large value" and only if they were unset, but in the new version, they are both always set to NULL. I am thinking that this is causing the failure with adaptive image now. Can anyone confirm this?

I will continue to investigate and post a solution when/if I find it, but if anyone would offer more expertise it would be fantastic.

-Thanks, Ann

sanduhrs’s picture

Status: Active » Fixed

This issue only had an effect on the image style admin page.
Fixed that by providing a default value for the width attribute of the preview image.
Commited, thanks for reporting and the backround information!

jordi_bcktt’s picture

Same issue

sanduhrs’s picture

This should have been fixed since with release 7.x-1.4.
What release are you using?

jordi_bcktt’s picture

I upgraded to version 7.x-1.4 but the problem persists

sanduhrs’s picture

Status: Fixed » Active

What other effects are defined for that style?

jordi_bcktt’s picture

I deleted and recreated the styles and is now working perfectly. Thank you very much.

sanduhrs’s picture

Status: Active » Fixed

You're welcome.

Status: Fixed » Closed (fixed)

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

Danny Englander’s picture

@missmobtown -- Check to make sure all your Views slideshows are not being overwritten by the inline fixed widths and heights that are created with Views Slideshows: http://drupal.org/node/1359098