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

Added ability to add images to QR Code #35

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

Conversation

Nemesis-AS
Copy link
Contributor

Fixes #33

This PR adds the ability to add images to the QR Code. The ECC(Error Correction Code) is set automatically if an image is used.

This PR also removes the dependency file-saver, since the QR is manipulated on the client side and it is being downloaded using built-in browser methods, without the need for any dependencies.

I also changed the default value of the download format from JPEG to PNG since JPEGs use lossy compression, which may affect the readability of the QR Code.

QR_Code_Image_Demo.mp4

Any feedback is appreciated.

Copy link

netlify bot commented Jan 23, 2024

Deploy Preview for convert-to-qr ready!

Name Link
🔨 Latest commit 344a589
🔍 Latest deploy log https://app.netlify.com/sites/convert-to-qr/deploys/65bb6fe68b96a30008c7831e
😎 Deploy Preview https://deploy-preview-35--convert-to-qr.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@1010varun
Copy link
Owner

@Nemesis-AS by adding the logo user is unable to scan it.

@Nemesis-AS
Copy link
Contributor Author

I guess it might happen on the website because the canvas is being scaled down by default. It should work if the layout is changed so the canvas is not scaled down. I tested the QRs after downloading and it worked

Another fix can be tweaking the size of the logo to be even smaller

@1010varun
Copy link
Owner

download
@Nemesis-AS I am unable to scan QR like this, can you fix this issue

@Nemesis-AS
Copy link
Contributor Author

I'll try tweaking the size of the image to see if it works then

@1010varun
Copy link
Owner

@Nemesis-AS any updates on this

@Nemesis-AS
Copy link
Contributor Author

I have been unable to make any progress on this issue due to some urgent health issues, but will do it as soon as I can

@Nemesis-AS
Copy link
Contributor Author

I have reduced the image size and it can easily be adjusted further. I tried a few qr codes and they all seem to work now. Let me know if any still fail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the ability to add image at the center of the QR Code
2 participants