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

Adds support for an image overlay in the center of the QRCode, with automatic sizing #47

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

ericwastaken
Copy link

@ericwastaken ericwastaken commented Mar 20, 2017

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

…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.
@ericwastaken ericwastaken changed the title Added a section to the readme.md about error correction. Adds support for an image overlay in the center of the QRCode, with automatic sizing Mar 21, 2017
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

Successfully merging this pull request may close these issues.

2 participants