newlogic / smartscanner-core

ID scanning Android app and library. Supports MRZ, NFC, Barcodes, and ID PASS Lite cards.
Apache License 2.0
70 stars 19 forks source link

MRZ reading in portrait crash #152

Open gsipic opened 10 months ago

gsipic commented 10 months ago

Current Behaviour

The app will crash when trying to read MRZ in portrait position

java.lang.IllegalArgumentException: y + height must be <= bitmap.height()
                   at android.graphics.Bitmap.createBitmap(Bitmap.java:916)
                   at android.graphics.Bitmap.createBitmap(Bitmap.java:873)
                   at org.idpass.smartscanner.lib.mrz.MRZAnalyzer.analyze(MRZAnalyzer.kt:100)

Expected Behaviour

It should not crash and scanning MRZ with Portrait orientation should work

Steps to Reproduce the Problem

  1. Open SmartScanner App
  2. Go back to the home page and try to open MRZ, it will crash automatically

Context

jlduragos commented 10 months ago

Hello,

Can you please provide us the following details:

  1. Model of the device used
  2. Android OS version
gsipic commented 10 months ago

Model : Samsung A20e Android Version 11