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. No problem.
However, to crop, you need to enter both target width and target height, even when one of them is to remain unchanged.
So, lesson boys and girls: always enter width and height when defining a crop action in imagecache.
Comments
Sounds like a usability error
by gaele (not verified) on June 5, 2008 - 12:21Sounds like a usability error to me: on crop the imagecache UI should require both width and height.
Yes, that's my conclusion as
by jpoesen on June 9, 2008 - 10:36Yes, that's my conclusion as well. If not filling in a field results in a php error then the field should be mandatory.
Thx
J.
that is kinda crazy... glad
by heather (not verified) on August 10, 2008 - 01:51that is kinda crazy... glad you had this page up, because i'm getting this error... and there were certainly no clues as to why.
did you already make a ticket for this? i see a few already.. so not sure if there's any point in making another.
Post new comment