From 1d3137b68e41bff7541fa249d8946409d463f7f2 Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Tue, 29 Jan 2008 18:44:07 +0000 Subject: fixed a dynamic_output error, and a gdversion bug. --- system/libraries/Image_lib.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'system/libraries') 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'; -- cgit v1.2.3-24-g4f1b