ENHANCEMENT Added ability to call Image::SetRatioSize() which is a more versatile way of generating images

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76574 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2009-05-11 22:42:01 +00:00
parent 9044d7a141
commit 7c99e3306d

View File

@ -182,6 +182,14 @@ class Image extends File {
return $this->getFormattedImage('SetSize', $width, $height);
}
public function SetRatioSize($width, $height) {
return $this->getFormattedImage('SetRatioSize', $width, $height);
}
public function generateSetRatioSize(GD $gd, $width, $height) {
return $gd->resizeRatio($width, $height);
}
/**
* Resize this Image by width, keeping aspect ratio. Use in templates with $SetWidth.
* @return GD