Committed by
GitHub
Merge pull request #846 from ob-juliandixon/master
fix: error with returning image on android
Showing
1 changed file
with
4 additions
and
2 deletions
| @@ -107,14 +107,16 @@ class MobileScanner( | @@ -107,14 +107,16 @@ class MobileScanner( | ||
| 107 | val stream = ByteArrayOutputStream() | 107 | val stream = ByteArrayOutputStream() |
| 108 | bmResult.compress(Bitmap.CompressFormat.PNG, 100, stream) | 108 | bmResult.compress(Bitmap.CompressFormat.PNG, 100, stream) |
| 109 | val byteArray = stream.toByteArray() | 109 | val byteArray = stream.toByteArray() |
| 110 | + val bmWidth = bmResult.width | ||
| 111 | + val bmHeight = bmResult.height | ||
| 110 | bmResult.recycle() | 112 | bmResult.recycle() |
| 111 | 113 | ||
| 112 | 114 | ||
| 113 | mobileScannerCallback( | 115 | mobileScannerCallback( |
| 114 | barcodeMap, | 116 | barcodeMap, |
| 115 | byteArray, | 117 | byteArray, |
| 116 | - bmResult.width, | ||
| 117 | - bmResult.height | 118 | + bmWidth, |
| 119 | + bmHeight | ||
| 118 | ) | 120 | ) |
| 119 | 121 | ||
| 120 | } else { | 122 | } else { |
-
Please register or login to post a comment