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

The code is not scannable #61

Open
L1cardo opened this issue Oct 14, 2021 · 0 comments
Open

The code is not scannable #61

L1cardo opened this issue Oct 14, 2021 · 0 comments

Comments

@L1cardo
Copy link
Contributor

L1cardo commented Oct 14, 2021

This one is generated by CarBode-Barcode-Scanner-For-SwiftUI
DF1D830B-7D04-4AA8-9A85-2DB9D78CAE08

This one is generate by myself with code
58688B43-38FD-49EE-8C3E-A61049854A3B

func generateQRCode(from string: String) -> UIImage? {
    let data = string.data(using: String.Encoding.ascii)

    if let filter = CIFilter(name: "CIQRCodeGenerator") {
        filter.setValue(data, forKey: "inputMessage")
        let transform = CGAffineTransform(scaleX: 3, y: 3)

        if let output = filter.outputImage?.transformed(by: transform) {
            return UIImage(ciImage: output)
        }
    }

    return nil
}

And here is my question:

  1. The one generated by CarBode-Barcode-Scanner-For-SwiftUI looks weird, like there is some offset in every dot.
  2. And it can’t be scannable. :(

Any idea please?

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

1 participant