-
Notifications
You must be signed in to change notification settings - Fork 676
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
[New feature request] Add image into QR code. #232
Comments
You can just use PIL's method if the image factory is import qrcode
from PIL import Image
my_qrcode = qrcode.make("Some data here")
image = Image.open('image.jpg').resize((w, h)) # Resize before you paste!
my_qrcode.paste(image, (x, y)) # Set the coordinate
my_qrcode.save("my_qrcode.jpg") |
You can also use the new styled PIL image factory and embed an image directly: https://github.com/lincolnloop/python-qrcode/blob/master/README.rst#styled-image |
Why |
I didn't understand the question. Can you elaborate? Maybe show the code you're trying. |
Why
The two ways above, the image just override origin qrcode pixel, not 'embeded', so it can't Recognition, |
The qrcode object is actually the For overlay a transparent image, these methods should help. Please try to make the two pictures into the same mode via
|
Solved, reduce embed image size and set higher error correction level. |
Can I add image into QR code like below?
The text was updated successfully, but these errors were encountered: