This Python script generates a QR code with a specified URL and overlays a logo onto it. It utilizes the qrcode
library to generate the QR code and the PIL
library for image processing to overlay the logo.
qrcode
library: You can install it via pip with the commandpip install qrcode
.PIL
library: You can install it via pip with the commandpip install pillow
.
- Ensure you have installed the required libraries mentioned above.
- Replace the
logo_path
andurl
variables with your desired logo path and target URL, respectively. - Run the script.
- The script will generate a QR code image named
qr_with_logo.png
in the current directory.