Skip to content

Commit bb73f7b

Browse files
committed
:octocat: reader example (including false positive inspection) https://twitter.com/phpstorm/status/1521468418888716288
1 parent 5a110e7 commit bb73f7b

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

examples/reader.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
/**
3+
* reader.php
4+
*
5+
* @created 25.04.2022
6+
* @author smiley <[email protected]>
7+
* @copyright 2022 smiley
8+
* @license MIT
9+
*/
10+
11+
use chillerlan\QRCode\{QRCode, QROptions};
12+
13+
require_once __DIR__.'/../vendor/autoload.php';
14+
15+
/** @var chillerlan\Settings\SettingsContainerInterface $options */
16+
$options = new QROptions;
17+
$options->readerUseImagickIfAvailable = false;
18+
$options->readerGrayscale = true;
19+
$options->readerIncreaseContrast = true;
20+
21+
$result = (new QRCode($options))->readFromFile(__DIR__.'/../.github/images/example_image.png');
22+
23+
var_dump($result);

0 commit comments

Comments
 (0)