Skip to content

Commit

Permalink
PyQR: colores de relleno y fondo configurables
Browse files Browse the repository at this point in the history
  • Loading branch information
cperezabo committed Oct 5, 2023
1 parent 6ae7241 commit b569238
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pyqr.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ def GenerarImagen(
nro_doc_rec=20000000001,
tipo_cod_aut="E",
cod_aut=70417054367476,
color_relleno="black",
color_fondo="white",
):
"Generar una imágen con el código QR"
# basado en: https://www.afip.gob.ar/fe/qr/especificaciones.asp
Expand Down Expand Up @@ -139,7 +141,7 @@ def GenerarImagen(
qr.add_data(url)
qr.make(fit=True)

img = qr.make_image(fill_color="black", back_color="white")
img = qr.make_image(fill_color=color_relleno, back_color=color_fondo)

img.save(self.Archivo, self.Extension.upper())

Expand Down

0 comments on commit b569238

Please sign in to comment.