mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-09-03 05:57:19 +00:00
🚿
This commit is contained in:
@@ -26,8 +26,12 @@
|
||||
- [SVG with a round shape and randomly filled quiet zone](./svgRoundQuietzone.php): example similar to the QR Codes of a certain vendor ([#137](https://github.com/chillerlan/php-qrcode/discussions/137))
|
||||
- [SVG with logo, custom module shapes and custom finder patterns](./svgWithLogoAndCustomShapes.php): module- and finder pattern customization ([#150](https://github.com/chillerlan/php-qrcode/discussions/150))
|
||||
|
||||
|
||||
## Other examples
|
||||
|
||||
- [Authenticator](./authenticator.php): create a QR Code that displays an URI for a mobile authenticator (featuring [`chillerlan/php-authenticator`](https://github.com/chillerlan/php-authenticator))
|
||||
- [Interactive output](./qrcode-interactive.php): interactive demo (via [index.html](./index.html))
|
||||
- [Custom module shapes](./shapes.svg): SVG paths to customize the module shapes ([#150](https://github.com/chillerlan/php-qrcode/discussions/150))
|
||||
|
||||
|
||||
Please note that the examples are self-contained, meaning that all custom classes are defined in an example file, so they don't necessarily respect the PSR-4 one file = one class principle.
|
||||
|
||||
+2
-2
@@ -62,10 +62,10 @@ $options->moduleValues = [
|
||||
];
|
||||
|
||||
|
||||
$im = (new QRCode($options))->render('https://www.youtube.com/watch?v=dQw4w9WgXcQ');
|
||||
$out = (new QRCode($options))->render('https://www.youtube.com/watch?v=dQw4w9WgXcQ');
|
||||
|
||||
header('Content-type: image/png');
|
||||
|
||||
echo $im;
|
||||
echo $out;
|
||||
|
||||
exit;
|
||||
|
||||
@@ -205,7 +205,8 @@ trait QROptionsTrait{
|
||||
* Module values map
|
||||
*
|
||||
* - QRImagick, QRMarkupHTML, QRMarkupSVG: #ABCDEF, cssname, rgb(), rgba()...
|
||||
* - QREps, QRFpdf, QRGdImage: [63, 127, 255] // R, G, B
|
||||
* - QREps, QRFpdf, QRGdImage: [R, G, B] // 0-255
|
||||
* - QREps: [C, M, Y, K] // 0-255
|
||||
*/
|
||||
protected ?array $moduleValues = null;
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ use chillerlan\QRCode\Common\BitBuffer;
|
||||
use chillerlan\QRCode\Common\MaskPattern;
|
||||
use chillerlan\QRCode\Data\QRData;
|
||||
use chillerlan\QRCode\Output\QRGdImage;
|
||||
use chillerlan\QRCode\Output\QROutputInterface;
|
||||
use chillerlan\QRCode\QRCode;
|
||||
use chillerlan\QRCode\QROptions;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
@@ -50,6 +51,7 @@ final class QRDataTest extends TestCase{
|
||||
$this::assertSame(3, $matrix->getVersion()->getVersionNumber());
|
||||
|
||||
// attempt to read
|
||||
$options->outputType = QROutputInterface::GDIMAGE_PNG;
|
||||
$options->outputBase64 = false;
|
||||
$options->readerUseImagickIfAvailable = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user