reader.php 623 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * reader.php
  4. *
  5. * @created 25.04.2022
  6. * @author smiley <smiley@chillerlan.net>
  7. * @copyright 2022 smiley
  8. * @license MIT
  9. */
  10. namespace chillerlan\QRCodeExamples;
  11. use chillerlan\QRCode\{QRCode, QROptions};
  12. require_once __DIR__.'/../vendor/autoload.php';
  13. /** @var \chillerlan\Settings\SettingsContainerInterface $options */
  14. $options = new QROptions;
  15. $options->readerUseImagickIfAvailable = false;
  16. $options->readerGrayscale = true;
  17. $options->readerIncreaseContrast = true;
  18. $result = (new QRCode($options))->readFromFile(__DIR__.'/../.github/images/example_image.png');
  19. var_dump($result);