Skip to content

Commit

Permalink
Fix crash on invalid cropping rect size.
Browse files Browse the repository at this point in the history
  • Loading branch information
AnasMostefaoui committed Jan 31, 2023
1 parent 75aa130 commit a82694d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
16 changes: 8 additions & 8 deletions VisualSearch.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
135D8557297F9F9400217A6F /* VisualSearchService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 135D8555297F9F9400217A6F /* VisualSearchService.swift */; };
13C58AB6297FBD7C0039D501 /* ImageCaptureController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 13C58AB5297FBD7C0039D501 /* ImageCaptureController.storyboard */; };
13C58AB8297FC0AA0039D501 /* CropController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 13C58AB7297FC0AA0039D501 /* CropController.storyboard */; };
13E1D2D52982DE4D00101781 /* NyrisSDK in Frameworks */ = {isa = PBXBuildFile; productRef = 13E1D2D42982DE4D00101781 /* NyrisSDK */; };
13F2FDBC29891D000035133C /* NyrisSDK in Frameworks */ = {isa = PBXBuildFile; productRef = 13F2FDBB29891D000035133C /* NyrisSDK */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
Expand Down Expand Up @@ -71,7 +71,7 @@
buildActionMask = 2147483647;
files = (
135D8508297F94AF00217A6F /* Kingfisher in Frameworks */,
13E1D2D52982DE4D00101781 /* NyrisSDK in Frameworks */,
13F2FDBC29891D000035133C /* NyrisSDK in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -235,7 +235,7 @@
name = VisualSearch;
packageProductDependencies = (
135D8507297F94AF00217A6F /* Kingfisher */,
13E1D2D42982DE4D00101781 /* NyrisSDK */,
13F2FDBB29891D000035133C /* NyrisSDK */,
);
productName = VisualSearch;
productReference = 135D84EC297F939F00217A6F /* VisualSearch.app */;
Expand Down Expand Up @@ -267,7 +267,7 @@
mainGroup = 135D84E3297F939F00217A6F;
packageReferences = (
135D8506297F94AF00217A6F /* XCRemoteSwiftPackageReference "Kingfisher" */,
13E1D2D32982DE4D00101781 /* XCRemoteSwiftPackageReference "Nyris.IMX" */,
13F2FDBA29891D000035133C /* XCRemoteSwiftPackageReference "Nyris.IMX" */,
);
productRefGroup = 135D84ED297F939F00217A6F /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -534,12 +534,12 @@
minimumVersion = 7.0.0;
};
};
13E1D2D32982DE4D00101781 /* XCRemoteSwiftPackageReference "Nyris.IMX" */ = {
13F2FDBA29891D000035133C /* XCRemoteSwiftPackageReference "Nyris.IMX" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/nyris/Nyris.IMX.iOS";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 0.7.1;
minimumVersion = 0.7.2;
};
};
/* End XCRemoteSwiftPackageReference section */
Expand All @@ -550,9 +550,9 @@
package = 135D8506297F94AF00217A6F /* XCRemoteSwiftPackageReference "Kingfisher" */;
productName = Kingfisher;
};
13E1D2D42982DE4D00101781 /* NyrisSDK */ = {
13F2FDBB29891D000035133C /* NyrisSDK */ = {
isa = XCSwiftPackageProductDependency;
package = 13E1D2D32982DE4D00101781 /* XCRemoteSwiftPackageReference "Nyris.IMX" */;
package = 13F2FDBA29891D000035133C /* XCRemoteSwiftPackageReference "Nyris.IMX" */;
productName = NyrisSDK;
};
/* End XCSwiftPackageProductDependency section */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/nyris/Nyris.IMX.iOS",
"state" : {
"revision" : "d5b5484bf2eeea6806598fe0df3bc0a814df4bba",
"version" : "0.7.1"
"revision" : "a426b71e319f83dd3a3229da89c6546442621981",
"version" : "0.7.2"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ extension CropController {
for box in self.boxes where box.extractionFromFrame != nil {
let normalizedRect = box.region
.normalized(sourceFrame: box.extractionFromFrame!)
.toCGRect()
let crop = self.generateBox(boxRect: normalizedRect, outergap: 0)
self.boundingBoxes.append(crop)

Expand Down

0 comments on commit a82694d

Please sign in to comment.