diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-07-02 19:24:54 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-07-02 19:24:54 +0200 |
commit | 01215718d8b4eedcc15d3edf670b58b320c68d62 (patch) | |
tree | bf215e5e945f26ce35eac46210b4b7d37148c45a /system/libraries | |
parent | 0692a1eb0893f98a7a848e81385087ec8acd8f97 (diff) | |
parent | 655cfb789ec2a818ab0c8735224db1a4f79cdef0 (diff) |
Merge pull request #1550 from krynble/develop
Fixing imagemagick maintain ratio not implemented
Diffstat (limited to 'system/libraries')
-rw-r--r-- | system/libraries/Image_lib.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index 4735dfd08..899b995d4 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -855,7 +855,14 @@ 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 === TRUE) + { + $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; |