added example image

This commit is contained in:
smiley
2015-12-11 21:59:19 +01:00
parent f5d045a8a9
commit ec4dcf58d6
3 changed files with 12 additions and 1 deletions
+6
View File
@@ -54,6 +54,12 @@ Quick and simple:
echo '<img src="'.(new QRCode($data, new QRImage))->output().'" />';
```
<p align="center">
<a href="https://www.turnon2fa.com">
<img alt="QR codes are awesome!" src="https://raw.githubusercontent.com/codemasher/php-qrcode/master/examples/example_image.png">
</a>
</p>
Wait, what was that? Please again, slower!
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

+6 -1
View File
@@ -3,8 +3,13 @@
require_once '../vendor/autoload.php';
use chillerlan\QRCode\Output\QRImage;
use chillerlan\QRCode\Output\QRImageOptions;
use chillerlan\QRCode\QRCode;
$im = (new QRCode('https://www.youtube.com/watch?v=DLzxrzFCyOs&t=43s', new QRImage))->output();
$qrImageOptions = new QRImageOptions;
$qrImageOptions->pixelSize = 10;
#$qrImageOptions->cachefile = 'example_image.png';
$im = (new QRCode('https://www.youtube.com/watch?v=DLzxrzFCyOs&t=43s', new QRImage($qrImageOptions)))->output();
echo '<img src="'.$im.'" />';