Skip to content

Commit

Permalink
Merged in feature/single-line-image-encoding (pull request #18)
Browse files Browse the repository at this point in the history
Feature/single line image encoding
  • Loading branch information
Juraj Fulir committed Jan 18, 2018
2 parents bf15c38 + 0cc52b7 commit c22573c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion BlinkID/src/ios/sources/CDVBlinkIdScanner.m
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions Release notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c22573c

Please sign in to comment.