|
@@ -19,9 +19,9 @@ use chillerlan\QRCode\{QRCode, QRCodeException};
|
|
|
use chillerlan\Settings\SettingsContainerInterface;
|
|
use chillerlan\Settings\SettingsContainerInterface;
|
|
|
use Exception;
|
|
use Exception;
|
|
|
|
|
|
|
|
-use function array_values, base64_encode, call_user_func, count, extension_loaded, imagecolorallocate, imagecolortransparent,
|
|
|
|
|
|
|
+use function array_values, call_user_func, count, extension_loaded, imagecolorallocate, imagecolortransparent,
|
|
|
imagecreatetruecolor, imagedestroy, imagefilledrectangle, imagegif, imagejpeg, imagepng, in_array,
|
|
imagecreatetruecolor, imagedestroy, imagefilledrectangle, imagegif, imagejpeg, imagepng, in_array,
|
|
|
- is_array, ob_end_clean, ob_get_contents, ob_start, range, sprintf;
|
|
|
|
|
|
|
+ is_array, ob_end_clean, ob_get_contents, ob_start, range;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* Converts the matrix into GD images, raw or base64 output (requires ext-gd)
|
|
* Converts the matrix into GD images, raw or base64 output (requires ext-gd)
|
|
@@ -127,7 +127,7 @@ class QRImage extends QROutputAbstract{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if($this->options->imageBase64){
|
|
if($this->options->imageBase64){
|
|
|
- $imageData = sprintf('data:image/%s;base64,%s', $this->options->outputType, base64_encode($imageData));
|
|
|
|
|
|
|
+ $imageData = $this->base64encode($imageData, 'image/'.$this->options->outputType);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return $imageData;
|
|
return $imageData;
|