| @@ 82-92 (lines=11) @@ | ||
| 79 | } |
|
| 80 | ||
| 81 | // Disable image mode |
|
| 82 | if (!extension_loaded('gd')) { |
|
| 83 | $this->mode = 'text'; |
|
| 84 | } else { |
|
| 85 | $required_functions = array('imagecreatetruecolor', 'imagecolorallocate', 'imagefilledrectangle', 'imagejpeg', 'imagedestroy', 'imageftbbox'); |
|
| 86 | foreach ($required_functions as $func) { |
|
| 87 | if (!function_exists($func)) { |
|
| 88 | $this->mode = 'text'; |
|
| 89 | break; |
|
| 90 | } |
|
| 91 | } |
|
| 92 | } |
|
| 93 | } |
|
| 94 | ||
| 95 | /** |
|
| @@ 40-50 (lines=11) @@ | ||
| 37 | $this->invalid = true; |
|
| 38 | } |
|
| 39 | ||
| 40 | if (!extension_loaded('gd')) { |
|
| 41 | $this->mode = 'bmp'; |
|
| 42 | } else { |
|
| 43 | $required_functions = array('imagecreatetruecolor', 'imagecolorallocate', 'imagefilledrectangle', 'imagejpeg', 'imagedestroy', 'imageftbbox'); |
|
| 44 | foreach ($required_functions as $func) { |
|
| 45 | if (!function_exists($func)) { |
|
| 46 | $this->mode = 'bmp'; |
|
| 47 | break; |
|
| 48 | } |
|
| 49 | } |
|
| 50 | } |
|
| 51 | } |
|
| 52 | ||
| 53 | /** |
|