Showing
1 changed file
with
1 additions
and
1 deletions
| @@ -97,7 +97,7 @@ class MobileScanner( | @@ -97,7 +97,7 @@ class MobileScanner( | ||
| 97 | 97 | ||
| 98 | imageFormat.yuvToRgb(mediaImage, bitmap) | 98 | imageFormat.yuvToRgb(mediaImage, bitmap) |
| 99 | 99 | ||
| 100 | - val bmResult = rotateBitmap(bitmap, camera!!.cameraInfo.sensorRotationDegrees.toFloat()) | 100 | + val bmResult = rotateBitmap(bitmap, camera?.cameraInfo?.sensorRotationDegrees?.toFloat() ?: 90f) |
| 101 | 101 | ||
| 102 | val stream = ByteArrayOutputStream() | 102 | val stream = ByteArrayOutputStream() |
| 103 | bmResult.compress(Bitmap.CompressFormat.PNG, 100, stream) | 103 | bmResult.compress(Bitmap.CompressFormat.PNG, 100, stream) |
-
Please register or login to post a comment