summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/libraries/Image_lib.php13
-rw-r--r--user_guide/changelog.html4
-rw-r--r--user_guide/libraries/image_lib.html6
3 files changed, 12 insertions, 11 deletions
diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php
index 260075ecd..dbb6f82e0 100644
--- a/system/libraries/Image_lib.php
+++ b/system/libraries/Image_lib.php
@@ -110,7 +110,10 @@ class CI_Image_lib {
foreach ($props as $val)
{
$this->$val = '';
- }
+ }
+
+ // special consideration for master_dim
+ $this->master_dim = 'auto';
}
// --------------------------------------------------------------------
@@ -497,12 +500,6 @@ class CI_Image_lib {
}
// Create The Image
- //
- // old conditional which users report cause problems with shared GD libs who report themselves as "2.0 or greater"
- // it appears that this is no longer the issue that it was in 2004, so we've removed it, retaining it in the comment
- // below should that ever prove inaccurate.
- //
- // if ($this->image_library == 'gd2' AND function_exists('imagecreatetruecolor') AND $v2_override == FALSE)
if ($this->image_library == 'gd2' AND function_exists('imagecreatetruecolor'))
{
$create = 'imagecreatetruecolor';
@@ -692,7 +689,7 @@ class CI_Image_lib {
// we have to rename the temp file.
copy ($this->dest_folder.'netpbm.tmp', $this->full_dst_path);
unlink ($this->dest_folder.'netpbm.tmp');
- @chmod($this->full_dst_path, 0777);
+ @chmod($dst_image, 0777);
return TRUE;
}
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index 03c77d35c..b6125b7e1 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -117,7 +117,8 @@ Change Log
<li>Added a language entry for valid_ip validation error.</li>
<li>Modified prep_for_form() in the Validation class to accept arrays, adding support for POST array validation (via callbacks only)</li>
<li>Added an &quot;integer&quot; rule into the <a href="./libraries/validation.html">Validation</a> library.</li>
- <li>Added valid_base64() to the Validation library.</li>
+ <li>Added valid_base64() to the <a href="./libraries/validation.html">Validation</a> library.</li>
+ <li>Documented clear() in the <a href="../libraries/image_lib.html">Image Processing</a> library.</li>
<li>Changed the behaviour of custom callbacks so that they no longer trigger the &quot;required&quot; rule. </li>
<li>Modified Upload class $_FILES error messages to be more precise.</li>
<li>Moved the safe mode and auth checks for the Email library into the constructor. </li>
@@ -165,6 +166,7 @@ Change Log
<li>Removed an unused parameter from Profiler (#3332).</li>
<li>Fixed a bug (#3314) which would cause the top level path to be deleted in delete_files() of the File helper.</li>
<li>Fixed a bug (#2858) which referenced a wrong variable in the Image class.</li>
+ <li>Fixed a bug (#3024) in which master_dim wasn't gettitng reset by clear() in the Image library.</li>
<li>Fixed a bug (#3330) in the FTP class where a comparison wasn't getting made.</li>
<li>Fixed a bug (#3328) where the smiley helper might return an undefined variable.</li>
<li>Fixed a bug (#3310) with sanitization of globals in the Input class that could unset CI's global variables.</li>
diff --git a/user_guide/libraries/image_lib.html b/user_guide/libraries/image_lib.html
index 8566f5a41..ac5e87701 100644
--- a/user_guide/libraries/image_lib.html
+++ b/user_guide/libraries/image_lib.html
@@ -122,6 +122,7 @@ folder containing the image files must have file permissions of 777.</p>
<li>$this->image_lib->crop()</li>
<li>$this->image_lib->rotate()</li>
<li>$this->image_lib->watermark()</li>
+<li>$this-&gt;image_lib-&gt;clear()</li>
</ul>
<p>These functions return boolean TRUE upon success and FALSE for failure. If they fail you can retrieve the
@@ -413,6 +414,9 @@ if ( ! $this->image_lib->rotate())<br />
+<h2>$this-&gt;image_lib-&gt;clear()</h2>
+<p>The clear function resets all of the values used when processing an image. You will want to call this if you are processing images in a loop.</p>
+<p><code>$this-&gt;image_lib-&gt;clear();</code></p>
<p>&nbsp;</p>
<h1>Image Watermarking</h1>
@@ -643,8 +647,6 @@ will be positioned at the bottom/center of the image, 20 pixels from the bottom
</tr>
</table>
-
-
</div>
<!-- END CONTENT -->