如何使用ZXing.Net读取旋转的条形码?

时间:2018-03-14 13:20:42

标签: c# zxing.net

Image with barcode rotated 90 degrees

我的代码:

    private static string GetBarcode(Bitmap btBitmap)
    {
        IBarcodeReader reader = new BarcodeReader
        {
            AutoRotate = true,
            TryInverted = true,
            Options =
            {
                PossibleFormats = new List<BarcodeFormat> { BarcodeFormat.CODE_39 },
                TryHarder = true,
                ReturnCodabarStartEnd = true,
                PureBarcode = false
            }
        };

        return   reader.DecodeMultiple(btBitmap)?.ToString(); 
    }

返回空值,但如果旋转90度,则一切都读得很好。 怎么了?

0 个答案:

没有答案