Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dcshi/lua-resty-QRcode

QR encode tool for ngx_lua
https://github.com/dcshi/lua-resty-QRcode

Last synced: 7 days ago
JSON representation

QR encode tool for ngx_lua

Awesome Lists containing this project

README

        

libqrencode(http://fukuchi.org/works/qrencode/index.html.en) and libpng is need:
sudo apt-get install libqrencode-dev libpng12-dev

How to Use

local resty_qr = require "resty.QRcode";

local str = "http://dcshi.com";

local file = "/tmp/qr.png";

local color = "FF00F3"; --RGB

local qr = resty_qr:new(8, 4, 72, color); -- size margin dpi fg_color bg_color

local status = qr:saveQr(str, 0, 2, file) -- str level mode path_img