Skip to content

Commit

Permalink
Merge pull request reingart#112 from cperezabo/main
Browse files Browse the repository at this point in the history
PyQR: colores de relleno y fondo configurables
  • Loading branch information
reingart committed Oct 22, 2023
2 parents 6ae7241 + b569238 commit d4562d5
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 d4562d5

Please sign in to comment.