Index: branches/RC/core/units/images/image_tag_processor.php =================================================================== diff -u -N -r11892 -r11920 --- branches/RC/core/units/images/image_tag_processor.php (.../image_tag_processor.php) (revision 11892) +++ branches/RC/core/units/images/image_tag_processor.php (.../image_tag_processor.php) (revision 11920) @@ -1,6 +1,6 @@ getObject($params); + /* @var $object kDBItem */ + $this->makeRelativePaths($object); // show "noimage.gif" when requested image is missing OR was not uploaded @@ -221,6 +223,17 @@ $image_helper =& $this->Application->recallObject('ImageHelper'); /* @var $image_helper ImageHelper */ + $crop = $this->SelectParam($params, 'Crop,crop'); + if ($crop) { + $crop = $params['crop']; + if (strpos($crop, ';') === false) { + $crop = 'c|c'; + } + + $max_width = 'resize:' . $max_width . 'x' . $max_height . ';crop:' . $crop; + $max_height = null; + } + return $image_helper->ResizeImage($src_image, $max_width, $max_height); } elseif ($use_default_image) { @@ -323,7 +336,7 @@ $max_width = $this->getImageDimension('Width', $params); $max_height = $this->getImageDimension('Height', $params); - $image_dimensions = $image_helper->GetImageDimensions($img_path, $max_width, $max_height); + $image_dimensions = $image_helper->GetImageDimensions($img_path, $max_width, $max_height, $params); if (!$image_dimensions) { return false; }