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