micjahn / ZXing.Net

.Net port of the original java-based barcode reader and generator library zxing
Apache License 2.0
2.73k stars 665 forks source link

Object reference not set to an instance of an object with IMB barcode type #410

Closed bb10101010 closed 2 years ago

bb10101010 commented 2 years ago

Ver 0.16.8 Classical bug reproducible with this code and attached image:

            BarcodeReaderGeneric reader = new BarcodeReaderGeneric()
            {
                Options = new ZXing.Common.DecodingOptions()
                {
                    TryHarder = true,
                    PossibleFormats = new List<BarcodeFormat>(){ BarcodeFormat.IMB, },
                },
            };

            Bitmap image = (Bitmap)Bitmap.FromFile("bugreproduction.png");
            LuminanceSource source = new BitmapLuminanceSource(image);
            var results = reader.DecodeMultiple(source);

bugreproduction

micjahn commented 2 years ago

Thanks for reporting.