mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-10-14 07:46:21 +00:00
:octocat: simplify base64 URI creation
This commit is contained in:
@@ -20,7 +20,7 @@ namespace chillerlan\QRCodeExamples;
|
||||
|
||||
use chillerlan\QRCode\Output\QRImage;
|
||||
|
||||
use function base64_encode, imagechar, imagecolorallocate, imagecolortransparent, imagecopymerge, imagecreatetruecolor,
|
||||
use function imagechar, imagecolorallocate, imagecolortransparent, imagecopymerge, imagecreatetruecolor,
|
||||
imagedestroy, imagefilledrectangle, imagefontwidth, in_array, round, str_split, strlen;
|
||||
|
||||
class QRImageWithText extends QRImage{
|
||||
@@ -50,7 +50,7 @@ class QRImageWithText extends QRImage{
|
||||
}
|
||||
|
||||
if($this->options->imageBase64){
|
||||
$imageData = 'data:image/'.$this->options->outputType.';base64,'.base64_encode($imageData);
|
||||
$imageData = $this->base64encode($imageData, 'image/'.$this->options->outputType);
|
||||
}
|
||||
|
||||
return $imageData;
|
||||
|
||||
Reference in New Issue
Block a user