aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/chillerlan/php-qrcode/examples/imageWithText.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-03-19 13:55:18 +0000
committerMario <mario@mariovavti.com>2023-03-19 13:55:18 +0000
commit89285f1408d21091bb80d45b391ddcbe06ba8d0f (patch)
treeb2eb07d9f3d91d77f89a4565a58e6e5231b20c1c /vendor/chillerlan/php-qrcode/examples/imageWithText.php
parent0a679e503ef367eda3085c44af103ee53869a94f (diff)
parent17c0bb2069dcfe35d3febc5bfdb3a7295f15d49c (diff)
downloadvolse-hubzilla-8.2.tar.gz
volse-hubzilla-8.2.tar.bz2
volse-hubzilla-8.2.zip
Merge branch '8.2RC'8.2
Diffstat (limited to 'vendor/chillerlan/php-qrcode/examples/imageWithText.php')
-rw-r--r--vendor/chillerlan/php-qrcode/examples/imageWithText.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/vendor/chillerlan/php-qrcode/examples/imageWithText.php b/vendor/chillerlan/php-qrcode/examples/imageWithText.php
new file mode 100644
index 000000000..050781cba
--- /dev/null
+++ b/vendor/chillerlan/php-qrcode/examples/imageWithText.php
@@ -0,0 +1,33 @@
+<?php
+/**
+ * example for additional text
+ * @link https://github.com/chillerlan/php-qrcode/issues/35
+ *
+ * @filesource imageWithText.php
+ * @created 22.06.2019
+ * @author Smiley <smiley@chillerlan.net>
+ * @copyright 2019 Smiley
+ * @license MIT
+ */
+
+namespace chillerlan\QRCodeExamples;
+
+use chillerlan\QRCode\{QRCode, QROptions};
+
+require_once __DIR__.'/../vendor/autoload.php';
+
+$data = 'https://www.youtube.com/watch?v=DLzxrzFCyOs&t=43s';
+
+$options = new QROptions([
+ 'version' => 7,
+ 'outputType' => QRCode::OUTPUT_IMAGE_PNG,
+ 'scale' => 3,
+ 'imageBase64' => false,
+]);
+
+header('Content-type: image/png');
+
+$qrOutputInterface = new QRImageWithText($options, (new QRCode($options))->getMatrix($data));
+
+// dump the output, with additional text
+echo $qrOutputInterface->dump(null, 'example text');