diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2008-12-12 21:37:11 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2008-12-12 21:37:11 +0000 |
commit | 43e626f99e24c9ba12719f464e71e6f28cff7938 (patch) | |
tree | b8abfeea1b1665c175da79b9ebb7e34dad3005f0 /core | |
parent | 942dbe175ca1697c0cca99fb7aae03de6ca398e0 (diff) |
Change the resize option on creating thumbnails and resizes to Image::AUTO which will preserve the aspect ratio of the original image
Diffstat (limited to 'core')
-rw-r--r-- | core/models/item.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/models/item.php b/core/models/item.php index 3f3db0a7..25b1d7f3 100644 --- a/core/models/item.php +++ b/core/models/item.php @@ -160,7 +160,7 @@ class Item_Model extends ORM_MPTT { */ public function set_thumbnail($filename, $width, $height) { Image::factory($filename) - ->resize($width, $height, Image::WIDTH) + ->resize($width, $height, Image::AUTO) ->save($this->thumbnail_path()); $dims = getimagesize($this->thumbnail_path()); @@ -181,7 +181,7 @@ class Item_Model extends ORM_MPTT { */ public function set_resize($filename, $width, $height) { Image::factory($filename) - ->resize($width, $height, Image::WIDTH) + ->resize($width, $height, Image::AUTO) ->save($this->resize_path()); $dims = getimagesize($this->resize_path()); |