Skip to content

Commit 1adc73d

Browse files
committed
Merge branch 'develop' of github.com:OUDON/rmqr-generator into develop
2 parents 4905640 + e9d6002 commit 1adc73d

File tree

1 file changed

+48
-5
lines changed

1 file changed

+48
-5
lines changed

README.md

Lines changed: 48 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,19 @@
44

55
This is an rMQR Code image generator implemented in Python. This is implemented based on [ISO/IEC 23941:2022](https://www.iso.org/standard/77404.html).
66

7-
## Important Notice
7+
8+
## 📌 Important Notice
89
Please verify an image generated by this software whether it can decode correctly before use.
910

10-
## Basic Usage
11+
12+
## 🚀 Installation
13+
```
14+
pip install rmqrcode
15+
```
16+
17+
18+
## 📕 Basic Usage
19+
### Generate rMQR Code
1120
```py
1221
from rmqrcode import rMQR
1322
import rmqrcode
@@ -20,26 +29,60 @@ qr = rMQR.fit(
2029
)
2130
```
2231

23-
The `ecc` parameter is an enum value of rmqrcode.ErrorCorrectionLevel to select error correction level. The following values are available:
32+
The `ecc` parameter is an enum value of `rmqrcode.ErrorCorrectionLevel` to select error correction level. The following values are available:
2433
- **`ErrorCorrectionLevel.M`**: Approx. 15% Recovery Capacity.
2534
- **`ErrorCorrectionLevel.H`**: Approx. 30% Recovery Capacity.
2635

27-
The `fit_strategy` parameter is enum value of rmqrcode.FitStrategy to specify how to determine size of rMQR Code. The following values are available:
36+
The `fit_strategy` parameter is enum value of `rmqrcode.FitStrategy` to specify how to determine size of rMQR Code. The following values are available:
2837
- **`FitStrategy.MINIMIZE_WIDTH`**: Try to minimize width.
2938
- **`FitStrategy.MINIMIZE_HEIGHT`**: Try to minimize height.
3039
- **`FitStrategy.BALANCED`**: Try to keep balance of width and height.
3140

3241
Here is an example of images genereated by each fit strategies for data `Test test test`:
3342
![Example of fit strategies](https://user-images.githubusercontent.com/14174940/172822478-4f2b5fb8-49bd-464f-b6b2-c7347f71cbf5.png)
3443

35-
## Advanced Usage
44+
### Save as image
45+
```py
46+
from rmqrcode import QRImage
47+
48+
image = QRImage(qr, module_size=8)
49+
image.show()
50+
image.save("my_qr.png")
51+
```
52+
53+
54+
## 📚 Advanced Usage
3655
### Select rMQR Code size manually
3756
To select rMQR Code size manually, use `rMQR()` constructor.
3857
```py
3958
qr = rMQR('R11x139', ErrorCorrectionLevel.H)
4059
qr.make("https://oudon.xyz")
4160
```
4261

62+
`R11x139` means 11 rows and 139 columns. The following table shows available combinations.
63+
64+
| |27|43|59|77|99|139|
65+
|-|:-:|:-:|:-:|:-:|:-:|:-:|
66+
|R7|||||||
67+
|R9|||||||
68+
|R11|||||||
69+
|R13|||||||
70+
|R15|||||||
71+
|R17|||||||
72+
73+
74+
## 🛠️ Under the Hood
75+
### Encoding modes
76+
77+
The rMQR Code has the four encoding modes Numeric, Alphanumeric, Byte and Kanji to convert data efficiently. However, this package supoprts only Byte mode currently.
78+
79+
|Mode|Supported?|
80+
|-|:-:|
81+
|Numeric| |
82+
|Alphanumeric||
83+
|Byte||
84+
|Kanji||
85+
4386
----
4487
The word "QR Code" is registered trademark of DENSO WAVE Incorporated.<br>
4588
http://www.denso-wave.com/qrcode/faqpatent-e.html

0 commit comments

Comments
 (0)