From 43e626f99e24c9ba12719f464e71e6f28cff7938 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 12 Dec 2008 21:37:11 +0000 Subject: Change the resize option on creating thumbnails and resizes to Image::AUTO which will preserve the aspect ratio of the original image --- core/models/item.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/models') 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()); -- cgit v1.2.3