? image_13.patch Index: image.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/image/image.module,v retrieving revision 1.197.2.3 diff -u -F^f -r1.197.2.3 image.module --- image.module 23 Aug 2006 20:00:31 -0000 1.197.2.3 +++ image.module 29 Aug 2006 13:42:40 -0000 @@ -517,6 +553,15 @@ function _image_build_derivatives(&$node _image_remove($node); } foreach ($sizes as $size) { + if ((!$size['width'] || !$size['height']) && ($info = image_get_info(file_create_path($node->images['_original'])))) { + $aspect = $info['height'] / $info['width']; + if ($size['width'] && !$size['height']) { + $size['height'] = (int)round($size['width'] * $aspect); + } + elseif ($size['height'] && !$size['width']) { + $size['width'] = (int)round($size['width'] / $aspect); + } + } if ($size['label'] && $size['width'] && $size['height']) { if ($info['width'] > $size['width'] || $info['height'] > $size['height']) { $source = file_create_path($node->images['_original']);