qr-code-styling
qr-code-styling copied to clipboard
something is wrong in this library.
this lib is dependent on https://kazuhikoarase.github.io/qrcode-generator/js/demo/.
when I create a QR there it's scannable from all devices and all QR apps.
but when I create the same QR from https://qr-code-styling.com/ without(image and styling) it's not scannable from less popular QR apps.
how this is possible?
reference app for android: https://play.google.com/store/apps/details/?id=com.mrakash.qrcodescanner ios: Facebook app, QR scanner Pro
Don't think it's this library, I've had the same issues using pretty much any QR Code styling library. As soon as you change the styling of a QR code even the slightest a lot of web and android based qr code scanners just don't want to scan the code.
Interestingly, iOS never has any issues from my testing.
Столкнулся с той же проблемой. Даже самый простой, совсем не измененный QR код в этой библиотеке - не сканируется. При этом в библиотеке https://kazuhikoarase.github.io/qrcode-generator/js/demo/ он сканируется очень хорошо.
В БИБЛИОТЕКЕ ЕСТЬ КРИТИЧЕСКАЯ ОШИБКА! Если ее не исправить, примерно половина распространенных сканеров не смогут расшифровать эти QR-коды. Ошибка в том, что пиксели-точки развернуты не верно, они отображены зеркально и повернуты на 90 градусов, это не правильно.
На изображении сверху 2 QR кода с одной и той же зашифрованной информацией. Слева, корректный и правильный QR-код, считывающийся всеми сканерами. Справа - QR-Code styling - с ошибкой размещения точек (окрашены бордовым цветом). Видно, что они развернуты не верно. Я пытался в библиотеку внести правку, перед отображением этот контейнер отображаю зеркально и сдвигаю на 180 градусов, это частично решает проблему. Но проблема всеравно дает о себе знать при загрузке фото в центр, фотография также переворачивается зеркально.
https://github.com/kozakdenys/qr-code-styling/pull/110
@dmitrystas this can be fixed too by the following code, it needs to be fixed in both QRSVG.ts and QRCanvas.ts:
WRONG:
dot.draw( xBeginning + i * dotSize, yBeginning + j * dotSize,
FIX:
dot.draw( yBeginning + j * dotSize, xBeginning + i * dotSize,
See fix here: https://github.com/sallandpioneers/qr-code-styling
This fork will be maintained until further notice by Salland Pioneers (business).