Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QR Creator

Example QR code with centered logo

Small CLI to generate QR codes from text or URLs, with an optional centered logo. Supports PNG, JPG, and SVG logos. SVG files are rasterized with transparency before placement. An example is placed on the right.

Requirements

  • Python 3.10+

Usage

# Text
python qr_creator.py --text "Hello, world!" -o qr.png

# URL
python qr_creator.py --url "https://example.com" -o qr.png

# With centered logo (PNG, JPG, or SVG)
python qr_creator.py --url "https://example.com" --logo logo.svg -o qr.png

or simply:

./qr_creator.py --text "Hello, world!" -o qr.png

Options

Flag Description
--text, -t Plain text to encode
--url, -u URL to encode
--output, -o Output path (default: qr_code.png)
--logo, -l Logo image path
--logo-ratio Logo size as fraction of QR width (default: 0.22)
--no-trim-logo Keep transparent padding around the logo
--box-size Pixels per QR module (default: 10)
--border Quiet zone in modules (default: 4)
--fill-color QR foreground color (default: black)
--back-color QR background color (default: white)

Notes

  • Uses high error correction so the QR code still scans with a center logo.
  • Logo trim only removes transparent padding; it does not crop into the logo artwork itself.
  • JPEG output drops transparency; use PNG for logos with alpha.

About

A mini one-file QR code creator for svg / png logo embed.

Topics

Resources

Stars

Watchers

Forks

Used by

Contributors

Languages