adamalfredsson / react-zxing

MIT License
99 stars 13 forks source link

Mirrored QR Codes #19

Open charlesfayal opened 11 months ago

charlesfayal commented 11 months ago

Is there a way to read mirrored QR Codes?

adamalfredsson commented 10 months ago

It appears that flipping a QR code renders it invalid. The scanner should be capable of detecting and transforming the flipped code before decoding it. However, I'm uncertain if zxing has this capability. Have you come across any information regarding this?

charlesfayal commented 10 months ago

I don’t know if it helps but react-qr-scanner has this capability and used zxing. But that library is getting outdatedOn Aug 17, 2023, at 7:03 AM, Adam Alfredsson @.***> wrote:

Message sent from a system outside of UConn.

It appears that flipping a QR code renders it invalid. The scanner should be capable of detecting and transforming the flipped code before decoding it. However, I'm uncertain if zxing has this capability. Have you come across any information regarding this? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Sec-ant commented 8 months ago

Hi, @adamalfredsson, hope you're well.

I'm the owner of zxing-wasm which is an ES module WebAssembly build wrapper of an actively maintained cpp port of ZXing zxing-cpp. zxing-wasm has smaller sizes, can read more barcode formats, has better performance and more decode hints to configure. It can also read mirrored or color-inverted barcodes.

As I know @zxing/library is in maintenance mode now and there won't be any active feature updates in the foreseeable future. I was wondering if we can join forces and integrate the zxing-wasm package into this repo?

I'm also expecting more feedbacks on the API or other things so I can make proper adjustments before releasing the first official version.

BTW, I have an another repo barcode-detector which serves as a polyfill of the Barcode Detection API of web browsers, that is built upon zxing-wasm. And barcode-detector is utilized in vue-qrcode-reader which is something like this repo but for Vue.js users. I have made some contributions there, and I think there're some common issues we can learn and solve together, especially those related to camera behaviors on different devices.

SD-Dude commented 7 months ago

Hi Guys, glad that you are already discussing this. Mirroring the image is super important from the user perspective. In the current setup, the user has to move the image in the opposite direction and it is counter-intuitive and spatially difficult for most people. Sure, with practice anyone can learn. @Sec-ant @adamalfredsson

In-addition, any component should have a visible and audible way to confirm capture of the barcode.

Thanks for the great work.

adamalfredsson commented 7 months ago

Hi @Sec-ant!

I think this sounds great and I would love to integrate this into react-zxing. Are you willing to help with this?

Thanks!

Sec-ant commented 7 months ago

@adamalfredsson Sure!

Given the different hints and the additional control of instantiation process of wasm, do you think we should add a new hook or reuse the current one with some new options maybe?

adamalfredsson commented 7 months ago

@Sec-ant I think it would be great to preserve the current interface to the largest extent possible – perhaps we can add a decoder option of type "zxing" | "zxing-wasm"?

And thanks a lot for helping out with this!