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

"Scan QR codes in" does not detect QR code #75

Closed
workflowsguy opened this issue Oct 19, 2022 · 5 comments
Closed

"Scan QR codes in" does not detect QR code #75

workflowsguy opened this issue Oct 19, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@workflowsguy
Copy link

Description

For testing purposes, I ran this action with a PNG image (created from a PDF file) that contains a QR code encoding transferal data for an invoice. The action produces an empty output.

To verify, I used a Python script that wraps the zxing-cpp library.
This correctly detects the QR code and outputs the encoded data

macOS/iOS version

macOS 12.6

Shortcut URL

No response

@workflowsguy workflowsguy added the bug Something isn't working label Oct 19, 2022
@sindresorhus
Copy link
Owner

Make sure you read the action description. You need to read the clipboard.

@workflowsguy
Copy link
Author

I cannot verify this.

The action description I see is this:

Scans QR codes in the input image and returns their
message. By default, it only returns the message for the first
QR code. The messages are sorted by the physical size of
their QR code in ascending order (largest first).

Image
File

Result
Text

I tested both with the image containing the non-recognized barcode and another image containing two QR codes.

The two barcodes in the second image are recognized and returned as a list of text items as described in the action information.

For neither of the images the barcode texts are put on the clipboard.

@sindresorhus
Copy link
Owner

Sorry, I got the rules confused.

@sindresorhus
Copy link
Owner

If it's unable to detect the QR code, I'm not sure there's much I can do about it. The action simply uses the macOS API to detect QR codes. It's macOS doing the actual work.

If your able to send me (either here or at sindresorhus@gmail.com) a QR code that reproduces the issue, I'm happy to take a closer look.

@workflowsguy
Copy link
Author

Thanks for the offer.
I did some futher experimenting and now was able to get the QR code recognized.

It seems like the image file has to have certain characteristics for a code to be successfully detected. I got a correct detection after converting the pdf to a 600 ppi png file. I will test this with several more files to see if this is actually the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants