imagecache

Drupal + imagecache + Invalid image dimensions error?

Imagecache was dutifully scaling images without any problems, when suddenly this error started popping up:

warning: imagecreatetruecolor() [function.imagecreatetruecolor]: 
Invalid image dimensions [...]

It started when I added an extra action to one of my imachecache presets: after scaling to a fixed width, I wanted to crop to a fixed height while keeping the previously attained width.

To scale to a fixed width, you need to enter the target width and keep the height blank. Quite straightforward.

Custom image manipulation in Drupal in just a few lines of code with the ImageAPI module

This article relates to Drupal 5.x.

Dopry, maintainer of imagecache, has released imagecache 2.x beta and ImageAPI 5.1.

A little someting about imagecache

For those of you who don’t know imagecache: it’s a very cool module that generates resized and/or cropped versions of images you upload to your Drupal site.