Skip to content

grc-iit/qrcodes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

QR Code Generator with Optional Embedded Image

This Python script generates a static QR code from a given URL and can optionally embed an image (such as a logo) at the center of the QR code.

Features

  • Generate a QR code from any URL
  • Optionally embed an image (logo) in the center of the QR code
  • Save the QR code as a PNG file

Requirements

Installation

Install the required dependencies:

pip install qrcode[pil] Pillow

Usage

python generate_qrcode.py <url> [--logo <image_path>] [--output <output_file>]
  • <url>: The URL to encode in the QR code (required)
  • --logo <image_path>: Path to the image to embed in the center of the QR code (optional)
  • --output <output_file>: Output file name (default: qrcode.png)

Examples

Generate a simple QR code:

python generate_qrcode.py "https://example.com"

Generate a QR code with a logo embedded:

python generate_qrcode.py "https://example.com" --logo logo.png --output myqrcode.png

Notes

  • The embedded image should ideally be a PNG with a transparent background for best results.
  • The script automatically resizes the logo to fit nicely within the QR code.

License

MIT

About

Used for static QR code generation for posters and such

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages