Code Duplication    Length = 4-4 lines in 2 locations

cloudcontrol/library/images/methods/Crop.php 1 location

@@ 111-114 (lines=4) @@
108
			// Create the new image
109
			$new = imagecreatetruecolor($this->_width, $this->_height);
110
			
111
			if ($this->_backgroundColor !== null) {
112
				$fill = imagecolorallocate($new, $this->_backgroundColor[0], $this->_backgroundColor[1], $this->_backgroundColor[2]);
113
				imagefill($new, 0, 0, $fill);
114
			}
115
116
			// Preserve transparency
117
			imagecolortransparent($new, imagecolorallocatealpha($new, 0, 0, 0, 127));

cloudcontrol/library/images/methods/SmartCrop.php 1 location

@@ 56-59 (lines=4) @@
53
			// Create the new image
54
			$new = imagecreatetruecolor($this->_width, $this->_height);
55
			
56
			if ($this->_backgroundColor !== null) {
57
				$fill = imagecolorallocate($new, $this->_backgroundColor[0], $this->_backgroundColor[1], $this->_backgroundColor[2]);
58
				imagefill($new, 0, 0, $fill);
59
			}
60
61
			// Preserve transparency
62
			imagecolortransparent($new, imagecolorallocatealpha($new, 0, 0, 0, 127));