mirror of
https://github.com/chillerlan/php-qrcode.git
synced 2026-08-30 20:17:17 +00:00
:octocat: reader example (including false positive inspection) https://twitter.com/phpstorm/status/1521468418888716288
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* reader.php
|
||||
*
|
||||
* @created 25.04.2022
|
||||
* @author smiley <smiley@chillerlan.net>
|
||||
* @copyright 2022 smiley
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
use chillerlan\QRCode\{QRCode, QROptions};
|
||||
|
||||
require_once __DIR__.'/../vendor/autoload.php';
|
||||
|
||||
/** @var chillerlan\Settings\SettingsContainerInterface $options */
|
||||
$options = new QROptions;
|
||||
$options->readerUseImagickIfAvailable = false;
|
||||
$options->readerGrayscale = true;
|
||||
$options->readerIncreaseContrast = true;
|
||||
|
||||
$result = (new QRCode($options))->readFromFile(__DIR__.'/../.github/images/example_image.png');
|
||||
|
||||
var_dump($result);
|
||||
Reference in New Issue
Block a user