Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images with more than one qrcode do not work #107

Open
steinm opened this issue May 11, 2021 · 5 comments
Open

Images with more than one qrcode do not work #107

steinm opened this issue May 11, 2021 · 5 comments

Comments

@steinm
Copy link

steinm commented May 11, 2021

If the image contains more than one qrcode it doesn't decode any of them.

@steinm
Copy link
Author

steinm commented May 11, 2021

114600906-barcode-and-qr-code-vector-set (1)

This is an example image which even causes a php fatal error due to an exhausted memory size

PHP Fatal error: Allowed memory size of 343932928 bytes exhausted (tried to allocate 268435464 bytes) in khanamiryan/qrcode-detector-decoder/lib/IMagickLuminanceSource.php on line 60

@jeorlie
Copy link

jeorlie commented Jun 1, 2021

this is crazy. why would you decode such things? even phone and QR code scanners cannot read those all in our go. you need to cut this into many images and do some loops.

In case I'm wrong and you manage to pull this, please share. someone might need that. happy coding :-)

@steinm
Copy link
Author

steinm commented Jun 1, 2021

It might be crazy to decode this one, but it causes a fatal error because of its memory consumption. Other images show the same behaviour.

@benediktcarda
Copy link

Zbarimg (a command line tool) is capable of finding and decoding several barcodes in one image returning one code per result line. Unfortunately it doesn't do the job very good (often not finding the bar codes). Unfortunately khanamiryan/php-qrcode-detector-decoder is not capable of detecting bar codes in larger images (like a png of a sheet of paper), one instance would take up more than 1 GB of RAM to process the image.

@dearsina
Copy link

@benediktcarda This seems to a limitation of the Zxing platform that was ported to PHP here. Zxing can also only extract one bar code per image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants