Index: branches/RC/core/units/images/image_tag_processor.php =================================================================== diff -u -r11937 -r11939 --- branches/RC/core/units/images/image_tag_processor.php (.../image_tag_processor.php) (revision 11937) +++ branches/RC/core/units/images/image_tag_processor.php (.../image_tag_processor.php) (revision 11939) @@ -1,6 +1,6 @@ Application->recallObject('ImageHelper'); /* @var $image_helper ImageHelper */ + $resize_format = 'resize:' . $max_width . 'x' . $max_height; + $crop = $this->SelectParam($params, 'Crop,crop'); if ($crop) { if (strpos($crop, ';') === false) { $crop = 'c|c'; } - $max_width = 'resize:' . $max_width . 'x' . $max_height . ';crop:' . $crop; + $max_width = (is_null($max_height) ? $max_width : $resize_format) . ';crop:' . $crop; $max_height = null; } $fill = $this->SelectParam($params, 'Fill,fill'); if ($fill) { - $max_width = 'resize:' . $max_width . 'x' . $max_height . ';fill:' . $fill; + $max_width = (is_null($max_height) ? $max_width : $resize_format) . ';fill:' . $fill; $max_height = null; } + $watermark = $this->SelectParam($params, 'Watermark,watermark'); + if ($watermark) { + $max_width = (is_null($max_height) ? $max_width : $resize_format) . ';wm:' . $watermark; + $max_height = null; + } + return $image_helper->ResizeImage($src_image, $max_width, $max_height); } elseif ($use_default_image) {