diff options
author | Derek Allard <derek.allard@ellislab.com> | 2008-01-29 19:44:07 +0100 |
---|---|---|
committer | Derek Allard <derek.allard@ellislab.com> | 2008-01-29 19:44:07 +0100 |
commit | 1d3137b68e41bff7541fa249d8946409d463f7f2 (patch) | |
tree | c627a7b5d7a5fba7857849f62bfe8940ec8171af /system/libraries/Image_lib.php | |
parent | 878cd70078c579f6c0ce8ad2e311518c8a688d17 (diff) |
fixed a dynamic_output error, and a gdversion bug.
Diffstat (limited to 'system/libraries/Image_lib.php')
-rw-r--r-- | system/libraries/Image_lib.php | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index 239865b9d..16a23f12a 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -449,14 +449,14 @@ class CI_Image_lib { if ($action == 'crop')
{
// If the target width/height match the source then it's pointless to crop, right?
- if ($this->width >= $this->orig_width AND $this->height >= $this->orig_height)
+ // So if dynamic output isn't on, then we'll return true so the user thinks
+ // the process succeeded. It'll be our little secret...
+
+ if ($this->width >= $this->orig_width AND $this->height >= $this->orig_height AND $this->dynamic_output !== TRUE)
{
- // We'll return true so the user thinks the process succeeded.
- // It'll be our little secret...
-
return TRUE;
}
-
+
// Reassign the source width/height if cropping
$this->orig_width = $this->width;
$this->orig_height = $this->height;
@@ -473,9 +473,7 @@ class CI_Image_lib { // If the target width/height match the source, AND if
// the new file name is not equal to the old file name
// we'll simply make a copy of the original with the new name
- if (($this->orig_width == $this->width AND $this->orig_height == $this->height) AND ($this->source_image != $this->new_image))
-
-
+ if (($this->orig_width == $this->width AND $this->orig_height == $this->height) AND ($this->source_image != $this->new_image))
{
if ( ! @copy($this->full_src_path, $this->full_dst_path))
{
@@ -499,7 +497,7 @@ class CI_Image_lib { }
// Create The Image
- if ($this->image_library == 'gd2' AND function_exists('imagecreatetruecolor') AND $v2_override == FALSE)
+ if ($this->image_library == 'gd2' AND function_exists('imagecreatetruecolor'))
{
$create = 'imagecreatetruecolor';
$copy = 'imagecopyresampled';
|