diff --git a/core/model/Image.php b/core/model/Image.php index b9ec18c5c..eb83b28a7 100755 --- a/core/model/Image.php +++ b/core/model/Image.php @@ -173,6 +173,10 @@ class Image extends File { return $this->getFormattedImage('SetWidth', $width); } + public function SetSize($width, $height) { + return $this->getFormattedImage('SetSize', $width, $height); + } + /** * Resize this Image by width, keeping aspect ratio. Use in templates with $SetWidth. * @return GD @@ -189,6 +193,14 @@ class Image extends File { return $gd->resizeByHeight($height); } + /** + * Resize this Image by both width and height, using padded resize. Use in templates with $SetSize. + * @return GD + */ + public function generateSetSize(GD $gd, $width, $height) { + return $gd->paddedResize($width, $height); + } + public function CMSThumbnail() { return $this->getFormattedImage('CMSThumbnail'); }