Redth / ZXing.Net.Maui

Barcode Scanning for MAUI?
MIT License
437 stars 146 forks source link

Can't reduce the scanning area? #116

Open HoGDylan opened 1 year ago

HoGDylan commented 1 year ago

Hello,

I'm using Zxing for a Barcode scanning app and I would like to reduce the scanning area. Because the barcodes my app needs to scan are in a list underneath each other I would like to be able to "aim" where the app is scanning, preferably by adding a little frame where the scan actually happens. I've tried doing this with the Frame property of the CameraBarcodeReaderView, but this seems to have no effect...

    <zxing:CameraBarcodeReaderView
        x:Name="scanner"
        IsDetecting="True"
        BarcodesDetected="scanner_BarcodesDetected"
        Frame="0, 0, 100, 50">
        <zxing:CameraBarcodeReaderView.Options>
            <zxingoptions:BarcodeReaderOptions AutoRotate="True" TryHarder="True" Formats="Code39"/>
        </zxing:CameraBarcodeReaderView.Options>
    </zxing:CameraBarcodeReaderView>

Am I doing something wrong or is there another way to do this?

Thanks!

Cybrosys commented 5 months ago

I have a similar request, but would also like to report it as an issue. It seems barcodes are read above and below my active camera view, probably because the image is being cropped. I would like to be able to specify the active scanning region.