The function imageapi_image_crop from imageapi.module file has an error when calculaing aspect of the image:

  $aspect = $image->info['height'] / $image->info['width'];
  if (empty($height)) $height = $width / $aspect;
  if (empty($width)) $width = $height * $aspect;

So for example when width is empty, calculated width = given height * image height / image width. This leads to strange aspect ratio for resulting image. I would expect that calculated width = image width. To correct this, modify calculated aspect:

  $aspect = $image->info['width'] / $image->info['height'];

Sorry I don't how to make a patch.

Comments

drewish’s picture

Status: Active » Postponed (maintainer needs more info)

could you try this on the latest release and let me know if it's still a problem?

ocanzillon’s picture

Sorry I don't remember what was the use case... You can close this issue.