summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-07-02 19:24:54 +0200
committerAndrey Andreev <narf@bofh.bg>2012-07-02 19:24:54 +0200
commit01215718d8b4eedcc15d3edf670b58b320c68d62 (patch)
treebf215e5e945f26ce35eac46210b4b7d37148c45a
parent0692a1eb0893f98a7a848e81385087ec8acd8f97 (diff)
parent655cfb789ec2a818ab0c8735224db1a4f79cdef0 (diff)
Merge pull request #1550 from krynble/develop
Fixing imagemagick maintain ratio not implemented
-rw-r--r--system/libraries/Image_lib.php9
-rw-r--r--user_guide_src/source/changelog.rst1
2 files changed, 9 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;
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index d8b935252..efe49cfe0 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -150,6 +150,7 @@ Release Date: Not Released
- Added support for 3-length hex color values for wm_font_color and wm_shadow_color properties, as well as validation for them.
- Class properties wm_font_color, wm_shadow_color and wm_use_drop_shadow are now protected, to avoid breaking the text_watermark() method if they are set manually after initialization.
- If property maintain_ratio is set to TRUE, image_reproportion() now doesn't need both width and height to be specified.
+ - Property maintain_ratio is now taken into account when resizing images using ImageMagick library
- Removed SHA1 function in the :doc:`Encryption Library <libraries/encryption>`.
- Added $config['csrf_regeneration'] to the CSRF protection in the :doc:`Security library <libraries/security>`, which makes token regeneration optional.
- Added $config['csrf_exclude_uris'] to the CSRF protection in the :doc:`Security library <libraries/security>`, which allows you list URIs which will not have the CSRF validation functions run.