zxing-js / browser

ZXing for JS's browser layer with decoding implementations for browser.
MIT License
223 stars 44 forks source link

Need Camera Zoom feature. #34

Open hakuna0829 opened 4 years ago

hakuna0829 commented 4 years ago

Hello.

Hope you guys are fine. This lib is so great. Btw, I have one trouble using this one. Sometimes, I need to capture small size QRcode like 1.2cm x 1.2cm , and this lib doesn't work. If it provides zoom in, then it would be great. How can I add this zoom functionality using this lib?

If you have good idea to customize it, let me know soon.

Thanks.

github-actions[bot] commented 4 years ago

Stale issue message

graemesmithmedkeeper commented 4 years ago

I would like to see this too.

I wonder if there is any way around this to apply some cropping to the video feed with JS prior to ZXing processing it?

odahcam commented 4 years ago

Yes, there is, please search the issues and you will find a lot of info there. I sure need to document this when I got some time.

Although there is a way to crop, I find it interesting to use native APIs to work with the native camera zoom, this is certainly something to look for as a feature.

odahcam commented 4 years ago

@graemesmithmedkeeper I remember to discuss cropping in zxing-js/library#39 and zxing-js/library#305 . Hope it helps.

graemesmithmedkeeper commented 4 years ago

Thanks, appreciate it! I sort of eventually figured it out myself and did I think something almost exactly like what this comment describes https://github.com/zxing-js/library/issues/305#issuecomment-653580507

I agree that some documentation improvements would be good. I really like this library (it's really good as a totally free and extensible alternative to commercial libraries like Scandit and Dynamsoft). Documentation is a bit of a weak point but all it really needs is some attention from maintainers interested in writing about how it works.

odahcam commented 4 years ago

Yeah, documentation is really hard to do when your team is the size of 2 developers and both very busy. So when we have time we choose to implement functionality and bugfixes prioritizing the existing users. That's a shame, unfortunately, but will get to the documentation point.

rmannibucau commented 3 years ago

+1 can be neat since more and more of "small" codes are popping up (in particular for datamatrix ones) and the default browser wrapping is hard to extend without some more advanced feature but when it works wired to a <video> it is just awesome.