From bb531d6284e3a936e8e2184104edd9a665c5c363 Mon Sep 17 00:00:00 2001 From: Omar Date: Fri, 29 Jun 2012 10:48:28 -0300 Subject: Fixing imagemagick maintain ratio not implemented --- system/libraries/Image_lib.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'system/libraries/Image_lib.php') diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index 4735dfd08..ebd214ef0 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -855,7 +855,10 @@ class CI_Image_lib { } else // Resize { - $cmd .= ' -resize '.$this->width.'x'.$this->height.' "'.$this->full_src_path.'" "'.$this->full_dst_path.'" 2>&1'; + if($this->maintain_ratio) + $cmd .= " -resize ".$this->width."x".$this->height." \"$this->full_src_path\" \"$this->full_dst_path\" 2>&1"; + else + $cmd .= " -resize ".$this->width."x".$this->height."\\! \"$this->full_src_path\" \"$this->full_dst_path\" 2>&1"; } $retval = 1; -- cgit v1.2.3-24-g4f1b