foxitsoftware / DelphiZXingQRCode

Delphi port of QR Code functionality from ZXing, a barcode image processing library.
Apache License 2.0
198 stars 115 forks source link

Here's my FMX Threaded Component version of DelphiZXingQRCode with all updates from the pull requests! #14

Open War3Evo opened 2 years ago

War3Evo commented 2 years ago

I would have pulled a fork, but decided it was more better to just post a link here.

DelphiZXingQRCode isn't threaded by itself. I created a threaded component that wraps DelphiZXingQRCode inside a thread. You can control the thread speed via ThreadSleep in milliseconds (default is 40). Drop the number to 0 for the quickest results. Yes, in this version you can control the ErrorCorrectionLevel, thanks to the gosanefr pull request update. All the latest updates from the pull requests are in this version.

The OnGenerate* procedures are synchronized, so you should be safe to use them anywhere in your application.

You can check out the sample.pas for the code, but it's best you create a FMX multi device application and then look at the code to help you build your application. I'll update it later with a visual project, cause my Delphi 11 was buggin out like crazy. Delphi doesn't give you updates unless you pay for them. So the 11.2 updates aren't free because my subscription ran out.

https://github.com/War3Evo/gtDelphi/tree/develop/gtDelphiZXingQRCode

War3Evo commented 2 years ago

I've updated the component in my repo so that it can create a SVG file.

You can use a open source app like inkscape to resize the SVG without any blurriness.

I think you can also use https://skia4delphi.org/ to use it's SVG viewer.

Star my repo as I plan to add more updates. Follow the link below to find my repo:

https://github.com/War3Evo/gtDelphi/tree/develop/gtDelphiZXingQRCode