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

can not run with image #568

Open
gkeiuen2002 opened this issue Aug 12, 2024 · 1 comment
Open

can not run with image #568

gkeiuen2002 opened this issue Aug 12, 2024 · 1 comment

Comments

@gkeiuen2002
Copy link

image
after Dependencies and Installation
I tried to run but the result still can not run

  • I use window
@Erickrodrigu
Copy link

import qrcode

URL de la imagen del perro

image_url = "https://example.com/imagen_perro.jpg" # Cambia esto por la URL de tu imagen

Crear un objeto QR Code

qr = qrcode.QRCode(
version=1,
error_correction=qrcode.constants.ERROR_CORRECT_L,
box_size=10,
border=4,
)

Añadir la URL al código QR

qr.add_data(image_url)
qr.make(fit=True)

Crear una imagen del código QR

img = qr.make_image(fill='black', back_color='white')

Guardar la imagen

img.save('codigo_qr_perro.png')

print("Código QR generado y guardado como 'codigo_qr_perro.png'")

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

No branches or pull requests

2 participants