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