| @@ 120-128 (lines=9) @@ | ||
| 117 | * |
|
| 118 | * @return int Color index |
|
| 119 | */ |
|
| 120 | private function allocateColor($gd, $red, $green, $blue, $alpha = 0) |
|
| 121 | { |
|
| 122 | $c = imagecolorexactalpha($gd, $red, $green, $blue, $alpha); |
|
| 123 | if ($c >= 0) { |
|
| 124 | return $c; |
|
| 125 | } |
|
| 126 | ||
| 127 | return imagecolorallocatealpha($gd, $red, $green, $blue, $alpha); |
|
| 128 | } |
|
| 129 | ||
| 130 | protected function parseHexColor($hexCol) |
|
| 131 | { |
|
| @@ 352-360 (lines=9) @@ | ||
| 349 | * |
|
| 350 | * @return int Color index |
|
| 351 | */ |
|
| 352 | private function allocateColor($im, $red, $green, $blue, $alpha = 0) |
|
| 353 | { |
|
| 354 | $c = imagecolorexactalpha($im, $red, $green, $blue, $alpha); |
|
| 355 | if ($c >= 0) { |
|
| 356 | return $c; |
|
| 357 | } |
|
| 358 | ||
| 359 | return imagecolorallocatealpha($im, $red, $green, $blue, $alpha); |
|
| 360 | } |
|
| 361 | ||
| 362 | private function render32bit($metadata, $im) |
|
| 363 | { |
|