HUB
Sign inSign up

midnightcoder/qrcode-api

By midnightcoder

•Updated almost 6 years ago

api to encode cleartext into a qrcode (png format) and decode png image into text

Image
0

1.2K

midnightcoder/qrcode-api repository overview

⁠Run

docker run -it -d --rm --name qrcode-api -p 3000:3000 midnightcoder/qrcode-api:latest

If you are using a Raspberry pi (4 preferably)

docker run -it -d --rm --name qrcode-api -p 3000:3000 midnightcoder/qrcode-api:arm64

⁠Examples

  1. Getting qrcode (outpunt in png format)
curl  'http://localhost:3000/t2q?info=hello+world' > /tmp/out.png

Optionally you can specify the width (400 by default)

curl  'http://localhost:3000/t2q?info=hello+world&width=200' > /tmp/out.png
  1. Decode qrcode
curl -F 'upfile=@/tmp/out.png' http://localhost:3000/q2t
# output
# {"info":"hello world","width":400,"height":400}
Tag summary
Recent tags
Content type
Image
Digest
Size
369 MB
Last updated
almost 6 years ago
docker pull midnightcoder/qrcode-api:latest