diff --git a/BlinkID/src/android/java/com/phonegap/plugins/blinkid/BlinkIdScanner.java b/BlinkID/src/android/java/com/phonegap/plugins/blinkid/BlinkIdScanner.java index 6875476..9c7ae20 100644 --- a/BlinkID/src/android/java/com/phonegap/plugins/blinkid/BlinkIdScanner.java +++ b/BlinkID/src/android/java/com/phonegap/plugins/blinkid/BlinkIdScanner.java @@ -648,7 +648,7 @@ private String encodeImageBase64(Image image) { boolean success = resultImgBmp.compress(Bitmap.CompressFormat.JPEG, COMPRESSED_IMAGE_QUALITY, byteArrayOutputStream); String resultImgBase64 = null; if (success) { - resultImgBase64 = Base64.encodeToString(byteArrayOutputStream.toByteArray(), Base64.DEFAULT); + resultImgBase64 = Base64.encodeToString(byteArrayOutputStream.toByteArray(), Base64.NO_WRAP); } try { byteArrayOutputStream.close(); diff --git a/BlinkID/src/ios/sources/CDVBlinkIdScanner.m b/BlinkID/src/ios/sources/CDVBlinkIdScanner.m index 8d31c6c..ea91518 100644 --- a/BlinkID/src/ios/sources/CDVBlinkIdScanner.m +++ b/BlinkID/src/ios/sources/CDVBlinkIdScanner.m @@ -941,7 +941,7 @@ - (void)setupDictionary:(NSMutableDictionary *)dict withImageMetadata:(PPImageMe if (imageMetadata.image == nil) return; NSData *imageData = UIImageJPEGRepresentation(imageMetadata.image, COMPRESSED_IMAGE_QUALITY / 100.f); - [dict setObject:[imageData base64EncodedStringWithOptions:NSDataBase64Encoding64CharacterLineLength] forKey:resultKey]; + [dict setObject:[imageData base64EncodedStringWithOptions:NSDataBase64EncodingEndLineWithLineFeed] forKey:resultKey]; } - (void)setupDictionary:(NSMutableDictionary *)dict withImagesForResult:(PPRecognizerResult *)result { diff --git a/Release notes.md b/Release notes.md index 163fb5a..12d0196 100644 --- a/Release notes.md +++ b/Release notes.md @@ -5,6 +5,7 @@ - `GermanIDBack` - scans the back of German ID cards - `GermanPassport` - scans the front of German passports - updated iOS SDK to [2.15.0](https://github.com/BlinkID/blinkid-ios/releases/tag/v2.15.0) +- return image encoded as a single line ## 1.4.2 - added languages support for scanning window