can not run with image #507

Open
opened 2026-01-29 21:48:21 +00:00 by claunia · 1 comment
Owner

Originally created by @gkeiuen2002 on GitHub (Aug 12, 2024).

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

  • I use window
Originally created by @gkeiuen2002 on GitHub (Aug 12, 2024). ![image](https://github.com/user-attachments/assets/0c19ce00-8940-444a-9d90-df7a1bfc9a3e) after Dependencies and Installation I tried to run but the result still can not run - I use window
Author
Owner

@Erickrodrigu commented on GitHub (Aug 13, 2024):

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'")

@Erickrodrigu commented on GitHub (Aug 13, 2024): 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 in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TencentARC/GFPGAN#507