PostgreSQL extension to generate QR code
This project adds 2 functionality to QR code generator from repository https://github.com/swex/QR-Image-embedded:
- In-memory monochrome bitmap construction (1 bit per pixel).
- Wrap the whole package as PostgreSQL extension.
This project has been compiled successfully in Linux against PostgreSQL version 11.
$ make clean
$ make
$ make install
On successful compilation, install this extension in PostgreSQL environment
$ create extension pgqr
Function pgqr has 4 parameters:
- t text: text to be encoded.
- correction_level integer: 0 to 3.
- model_number integer: 0 to 2.
- scale integer: pixels for each dot.
Let us create a QR Code
$ select pgqr('QR Code with PostgreSQL', 0, 0, 4);
The output is a monochrome bitmap ready for display.