allgood / OpenNoteScanner

Android application for scanning and manipulating handwritten notes and documents.
Other
1.37k stars 284 forks source link

Create bitmap in background #190

Open cataloque opened 4 years ago

cataloque commented 4 years ago

Dear developers, In the position of OpenNoteScanner's code: (1)com.ortiz.touchview.TouchImageView: void setImageURI(); (2)com.todobom.opennotescanner.helpers.Utils: android.graphics.Bitmap decodeSampledBitmapFromUri()

bitmap object is created with the invocation of setImageURI() and decodeStream(). However, these methods are slow operation and they are in the UI thread. Maybe you can process bitmaps in a background thread using AsyncTask.