-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
document on how to create a QR code with qrencode and imagemagick
- Loading branch information
1 parent
2e0a8c1
commit 2e4db02
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
posts/2024-11-03-create-a-qr-code-from-the-command-line.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Date: 2024-11-03 | ||
Title: Create a QR code from the command line | ||
Tags: QR code, Tools, TIL | ||
|
||
Lindsay, my wife, has been working on her [online shop (gestempelt & gedruckt — unique handicrafts inspired by nature)](https://gestempelt-und-gedruckt.ch/) for the last few months. Now that it’s complete, she's eager to get the word out with flyers. For this, she needed a QR code with the shop's URL to make it easier for people to scan. | ||
|
||
So how do you generate a white QR code with the rest being transparent without needing to sign up to a website? | ||
|
||
Use [qrencode](https://fukuchi.org/works/qrencode/) and [ImageMagick](https://imagemagick.org/) on the command line. | ||
|
||
First, install the applications using: | ||
|
||
```bash | ||
brew install qrencode imagemagick | ||
``` | ||
|
||
Then, generate the QR code: | ||
|
||
```bash | ||
# Create the QR code (white on black). | ||
qrencode -s 20 --foreground=ffffff --background=000000 -l H -o "URL.png" "https://gestempelt-und-gedruckt.ch/" | ||
|
||
# Replace black with "transparent". | ||
convert URL.png -fuzz 10% -transparent black URL_transparent.png | ||
``` |