You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+48-5
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,19 @@
4
4
5
5
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).
6
6
7
-
## Important Notice
7
+
8
+
## 📌 Important Notice
8
9
Please verify an image generated by this software whether it can decode correctly before use.
9
10
10
-
## Basic Usage
11
+
12
+
## 🚀 Installation
13
+
```
14
+
pip install rmqrcode
15
+
```
16
+
17
+
18
+
## 📕 Basic Usage
19
+
### Generate rMQR Code
11
20
```py
12
21
from rmqrcode import rMQR
13
22
import rmqrcode
@@ -20,26 +29,60 @@ qr = rMQR.fit(
20
29
)
21
30
```
22
31
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:
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:
28
37
-**`FitStrategy.MINIMIZE_WIDTH`**: Try to minimize width.
29
38
-**`FitStrategy.MINIMIZE_HEIGHT`**: Try to minimize height.
30
39
-**`FitStrategy.BALANCED`**: Try to keep balance of width and height.
31
40
32
41
Here is an example of images genereated by each fit strategies for data `Test test test`:
33
42

34
43
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
36
55
### Select rMQR Code size manually
37
56
To select rMQR Code size manually, use `rMQR()` constructor.
38
57
```py
39
58
qr = rMQR('R11x139', ErrorCorrectionLevel.H)
40
59
qr.make("https://oudon.xyz")
41
60
```
42
61
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
+
43
86
----
44
87
The word "QR Code" is registered trademark of DENSO WAVE Incorporated.<br>
0 commit comments