Fixed a bug (#3024) in which master_dim wasn't getting reset by clear() in the Image library.

Documented clear()
diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php
index 260075e..dbb6f82 100644
--- a/system/libraries/Image_lib.php
+++ b/system/libraries/Image_lib.php
@@ -110,7 +110,10 @@
 		foreach ($props as $val)

 		{

 			$this->$val = '';

-		}  		

+		}

+

+		// special consideration for master_dim

+		$this->master_dim = 'auto';

 	}

 	

 	// --------------------------------------------------------------------

@@ -497,12 +500,6 @@
 		}

 

 		//  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 @@
 		// 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;

 	}