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.