Adds support for an image overlay in the center of the QRCode, with automatic sizing#47
Open
ericwastaken wants to merge 6 commits intoaschuch:masterfrom
Open
Adds support for an image overlay in the center of the QRCode, with automatic sizing#47ericwastaken wants to merge 6 commits intoaschuch:masterfrom
ericwastaken wants to merge 6 commits intoaschuch:masterfrom
Conversation
…eady implemented in the code, but was not otherwise mentioned in the docs.
…ained in size so that the error correction still allows the QRCode to be decodable. * Added images into the Example app for testing * Added an extension to UIImage for easy resizing of the overlay image * Refactor of QRCode.swift: * Expanded enum for error correction which now also carries the percentage that the error correction level is able to recover from * Adds 2 new properties to reference the overlay image and the percentage (within the error correction percentage) that the overlay should be constrained to * Adds a new method imageWithOverlay which returns the QRCode with the overlay image on top * Changes to the main.storyboard to add a “switch” that allows toggle of the regular QRCodes and QRCodes with overlays * Refactors ViewController to handle the two “states” of showing QRCodes without overlay or with overlay
…ins as it was, except moved into a function.
Adds in the missing UIImage extension.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added a section to the readme.md about error correction, which is already implemented in the code, but was not otherwise mentioned in the doc. This might be helpful to other folks like me that might be looking to control this value.
Also, added support for an overlayImage (the second 2 commits) as well as updated documentation to discuss this new feature as well.
I completely understand if you'd rather leave this as a fork!
Thanks so much for this library. Much appreciated.
E