public
nobgit
read
NobMail
Based on mailcow: dockerized
Languages
Repository composition by tracked source files.
PHP
49%
JavaScript
35%
HTML
9%
CSS
4%
Shell
2%
Python
1%
Lua
0%
Perl
0%
Ruby
0%
SCSS
0%
Create file
Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git
Trace
data/web/inc/lib/vendor/bacon/bacon-qr-code/README.md
Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.
Author
Date
Commit
Line
Code
1
# QR Code generator
3
[](https://github.com/Bacon/BaconQrCode/actions/workflows/ci.yml)
4
[](https://codecov.io/gh/Bacon/BaconQrCode)
5
[](https://packagist.org/packages/bacon/bacon-qr-code)
6
[](https://packagist.org/packages/bacon/bacon-qr-code)
7
[](https://packagist.org/packages/bacon/bacon-qr-code)
10
## Introduction
11
BaconQrCode is a port of QR code portion of the ZXing library. It currently
12
only features the encoder part, but could later receive the decoder part as
13
well.
15
As the Reed Solomon codec implementation of the ZXing library performs quite
16
slow in PHP, it was exchanged with the implementation by Phil Karn.
19
## Example usage
20
```php
21
use BaconQrCode\Renderer\ImageRenderer;
22
use BaconQrCode\Renderer\Image\ImagickImageBackEnd;
23
use BaconQrCode\Renderer\RendererStyle\RendererStyle;
24
use BaconQrCode\Writer;
26
$renderer = new ImageRenderer(
27
new RendererStyle(400),
28
new ImagickImageBackEnd()
29
);
30
$writer = new Writer($renderer);
31
$writer->writeFile('Hello World!', 'qrcode.png');
32
```
34
## Available image renderer back ends
35
BaconQrCode comes with multiple back ends for rendering images. Currently included are the following:
37
- `ImagickImageBackEnd`: renders raster images using the Imagick library
38
- `SvgImageBackEnd`: renders SVG files using XMLWriter
39
- `EpsImageBackEnd`: renders EPS files