0
0
mirror of https://github.com/markusfisch/BinaryEye.git synced 2024-09-19 19:42:18 +02:00

Fix setting error correction level for QR Codes

ZXing C++ expects the error correction level to be in a range from
0 to 8, so the four possible values for QR codes need to be translated
into this range.
This commit is contained in:
Markus Fisch 2023-02-19 18:59:11 +01:00
parent 0ae7d080e3
commit 24766f55d4

View File

@ -142,7 +142,7 @@ class EncodeFragment : Fragment() {
content,
writer,
getSize(sizeBarView.progress),
ecSpinner.selectedItemPosition,
(ecSpinner.selectedItemPosition + 1) * 2,
if (writer.canBeInverted()) {
colorsSpinner.selectedItemPosition
} else 0