Skip to content

Commit

Permalink
Merge pull request #118 from BlinkID/release/5.1.0
Browse files Browse the repository at this point in the history
Release/5.1.0
  • Loading branch information
juraskrlec authored Dec 19, 2019
2 parents ff931d1 + 9ca2d8a commit 9afe271
Show file tree
Hide file tree
Showing 14 changed files with 239 additions and 152 deletions.
2 changes: 1 addition & 1 deletion BlinkID/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blinkid-cordova",
"version": "5.0.0",
"version": "5.1.0",
"description": "A small and powerful ID card scanning library",
"cordova": {
"id": "blinkid-cordova",
Expand Down
2 changes: 1 addition & 1 deletion BlinkID/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="blinkid-cordova"
version="5.0.0">
version="5.1.0">

<name>BlinkIdScanner</name>
<description>A small and powerful ID card scanning library</description>
Expand Down
2 changes: 1 addition & 1 deletion BlinkID/scripts/initIOSFramework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
HERE="$(dirname "$(test -L "$0" && readlink "$0" || echo "$0")")"
pushd "${HERE}/../src/ios/" > /dev/null

LINK='https://github.com/BlinkID/blinkid-ios/releases/download/v5.0.0/blinkid-ios_v5.0.0.zip'
LINK='https://github.com/BlinkID/blinkid-ios/releases/download/v5.1.0/blinkid-ios_v5.1.0.zip'
FILENAME='blinkid-ios.zip'

# check if Microblink framework and bundle already exist
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ public static JSONObject serializeMrzResult(MrzResult mrzResult) throws JSONExce
jsonMrz.put("applicationReceiptNumber", mrzResult.getApplicationReceiptNumber());
jsonMrz.put("immigrantCaseNumber", mrzResult.getImmigrantCaseNumber());
jsonMrz.put("mrzText", mrzResult.getMrzText());
jsonMrz.put("sanitizedOpt1", mrzResult.getSanitizedOpt1());
jsonMrz.put("sanitizedOpt2", mrzResult.getSanitizedOpt2());
jsonMrz.put("sanitizedNationality", mrzResult.getSanitizedNationality());
jsonMrz.put("sanitizedIssuer", mrzResult.getSanitizedIssuer());
jsonMrz.put("sanitizedDocumentCode", mrzResult.getSanitizedDocumentCode());
jsonMrz.put("sanitizedDocumentNumber", mrzResult.getSanitizedDocumentNumber());
jsonMrz.put("mrzParsed", mrzResult.isMrzParsed());
jsonMrz.put("mrzVerified", mrzResult.isMrzVerified());
return jsonMrz;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public final class BlinkIdCombinedRecognizerSerialization implements RecognizerS
@Override
public Recognizer<?> createRecognizer(JSONObject jsonRecognizer) {
com.microblink.entities.recognizers.blinkid.generic.BlinkIdCombinedRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.generic.BlinkIdCombinedRecognizer();
recognizer.setAllowBlurFilter(jsonRecognizer.optBoolean("allowBlurFilter", true));
recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250));
recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250));
recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors")));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public final class BlinkIdRecognizerSerialization implements RecognizerSerializa
@Override
public Recognizer<?> createRecognizer(JSONObject jsonRecognizer) {
com.microblink.entities.recognizers.blinkid.generic.BlinkIdRecognizer recognizer = new com.microblink.entities.recognizers.blinkid.generic.BlinkIdRecognizer();
recognizer.setAllowBlurFilter(jsonRecognizer.optBoolean("allowBlurFilter", true));
recognizer.setFaceImageDpi(jsonRecognizer.optInt("faceImageDpi", 250));
recognizer.setFullDocumentImageDpi(jsonRecognizer.optInt("fullDocumentImageDpi", 250));
recognizer.setFullDocumentImageExtensionFactors(BlinkIDSerializationUtils.deserializeExtensionFactors(jsonRecognizer.optJSONObject("fullDocumentImageExtensionFactors")));
Expand Down
2 changes: 1 addition & 1 deletion BlinkID/src/android/libBlinkID.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repositories {
}

dependencies {
implementation('com.microblink:blinkid:5.0.0@aar') {
implementation('com.microblink:blinkid:5.1.0@aar') {
transitive = true
}
}
Expand Down
8 changes: 7 additions & 1 deletion BlinkID/src/ios/sources/MBBlinkIDSerializationUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ +(NSDictionary *) serializeMrzResult:(MBMrzResult *)mrzResult {
@"immigrantCaseNumber" : mrzResult.immigrantCaseNumber,
@"mrzText" : mrzResult.mrzText,
@"mrzParsed" : [NSNumber numberWithBool:mrzResult.isParsed],
@"mrzVerified" : [NSNumber numberWithBool:mrzResult.isVerified]
@"mrzVerified" : [NSNumber numberWithBool:mrzResult.isVerified],
@"sanitizedOpt1" : mrzResult.sanitizedOpt1,
@"sanitizedOpt2" : mrzResult.sanitizedOpt2,
@"sanitizedNationality" : mrzResult.sanitizedNationality,
@"sanitizedIssuer" : mrzResult.sanitizedIssuer,
@"sanitizedDocumentCode" : mrzResult.sanitizedDocumentCode,
@"sanitizedDocumentNumber" : mrzResult.sanitizedDocumentNumber
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ -(instancetype) init {

-(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer {
MBBlinkIdCombinedRecognizer *recognizer = [[MBBlinkIdCombinedRecognizer alloc] init];
{
id allowBlurFilter = [jsonRecognizer valueForKey:@"allowBlurFilter"];
if (allowBlurFilter != nil) {
recognizer.allowBlurFilter = [(NSNumber *)allowBlurFilter boolValue];
}
}
{
id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"];
if (faceImageDpi != nil) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ -(instancetype) init {

-(MBRecognizer *) createRecognizer:(NSDictionary*) jsonRecognizer {
MBBlinkIdRecognizer *recognizer = [[MBBlinkIdRecognizer alloc] init];
{
id allowBlurFilter = [jsonRecognizer valueForKey:@"allowBlurFilter"];
if (allowBlurFilter != nil) {
recognizer.allowBlurFilter = [(NSNumber *)allowBlurFilter boolValue];
}
}
{
id faceImageDpi = [jsonRecognizer valueForKey:@"faceImageDpi"];
if (faceImageDpi != nil) {
Expand Down
Loading

0 comments on commit 9afe271

Please sign in to comment.