@thegrizzlylabs/react-native-genius-scan 5.0.2 → 5.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +1 -1
- package/ios/GSSDK/GSSDK.xcframework/Info.plist +5 -5
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/GSSDK +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/GSSDK_GSSDKObjC.bundle/PrivacyInfo.xcprivacy +19 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/GSSDK_GSSDKObjC.bundle/en.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKBackgroundKind.h +14 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKCurvatureCorrectionConfiguration.h +28 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKDefaultLogger.h +1 -1
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKDocumentComposition.h +16 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKDocumentDetector.h +3 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKEdgeCleaning.h +14 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKEnhancementConfiguration.h +51 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKFilterColorPalette.h +13 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKFilterStyle.h +19 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKFilterType.h +11 -1
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKLog.h +2 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKLogger.h +4 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKOutputConfiguration.h +41 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKPerspectiveCorrectionConfiguration.h +35 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKProcessingConfiguration.h +54 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKProcessingResult.h +56 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKResizeConfiguration.h +22 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKResizeResult.h +22 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKRotation.h +27 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKRotationConfiguration.h +35 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKScanProcessor.h +11 -210
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK-Swift.h +207 -11
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK.h +30 -20
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Info.plist +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.abi.json +5562 -1703
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +131 -7
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftinterface +131 -7
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/PrivacyInfo.xcprivacy +19 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/en.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/GSSDK +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/GSSDK_GSSDKObjC.bundle/PrivacyInfo.xcprivacy +19 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/GSSDK_GSSDKObjC.bundle/en.lproj/GSSDK.strings +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKBackgroundKind.h +14 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKCurvatureCorrectionConfiguration.h +28 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKDefaultLogger.h +1 -1
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKDocumentComposition.h +16 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKDocumentDetector.h +3 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKEdgeCleaning.h +14 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKEnhancementConfiguration.h +51 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKFilterColorPalette.h +13 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKFilterStyle.h +19 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKFilterType.h +11 -1
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKLog.h +2 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKLogger.h +4 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKOutputConfiguration.h +41 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKPerspectiveCorrectionConfiguration.h +35 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKProcessingConfiguration.h +54 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKProcessingResult.h +56 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKResizeConfiguration.h +22 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKResizeResult.h +22 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKRotation.h +27 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKRotationConfiguration.h +35 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKScanProcessor.h +11 -210
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK-Swift.h +414 -22
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK.h +30 -20
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Info.plist +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +5562 -1703
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +131 -7
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +131 -7
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +5562 -1703
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +131 -7
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +131 -7
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/PrivacyInfo.xcprivacy +19 -0
- package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/en.lproj/GSSDK.strings +0 -0
- package/package.json +1 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
//
|
|
2
|
+
// GSKOutputConfiguration.h
|
|
3
|
+
// GSSDK
|
|
4
|
+
//
|
|
5
|
+
// Created by Bruno Virlet on 16/04/2024.
|
|
6
|
+
// Copyright © 2024 The Grizzly Labs. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
A configuration that defines the output of the processing.
|
|
15
|
+
*/
|
|
16
|
+
@interface GSKOutputConfiguration : NSObject
|
|
17
|
+
/**
|
|
18
|
+
JPEG for color images.
|
|
19
|
+
PNG for monochrome images.
|
|
20
|
+
A default, sensible configuration: jpegQuality: 0.60
|
|
21
|
+
*/
|
|
22
|
+
+ (instancetype)defaultConfiguration;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
JPEG for color images with the specified quality.
|
|
26
|
+
PNG for monochrome images.
|
|
27
|
+
*/
|
|
28
|
+
+ (instancetype)automaticConfigurationWithJPEGQuality:(CGFloat)quality;
|
|
29
|
+
|
|
30
|
+
/// Image output will be JPEG, quality 0.60.
|
|
31
|
+
+ (instancetype)jpegOutputConfiguration;
|
|
32
|
+
|
|
33
|
+
/// Image output will be JPEG with specified quality.
|
|
34
|
+
+ (instancetype)jpegOutputConfigurationWithQuality:(CGFloat)quality;
|
|
35
|
+
|
|
36
|
+
/// Image output will be PNG.
|
|
37
|
+
+ (instancetype)pngOutputConfiguration;
|
|
38
|
+
|
|
39
|
+
@end
|
|
40
|
+
|
|
41
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
//
|
|
2
|
+
// GSKPerspectiveCorrectionConfiguration.h
|
|
3
|
+
// GSSDK
|
|
4
|
+
//
|
|
5
|
+
// Created by Bruno Virlet on 16/04/2024.
|
|
6
|
+
// Copyright © 2024 The Grizzly Labs. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
@class GSKQuadrangle;
|
|
12
|
+
|
|
13
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
14
|
+
|
|
15
|
+
/// A GSKPerspectiveCorrectionConfiguration defines the behavior of a GSKScanProcessor when applying perspective correction.
|
|
16
|
+
@interface GSKPerspectiveCorrectionConfiguration : NSObject
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
A configuration that will result in the document being auto-detected, and the perspective correction subsequently applied.
|
|
20
|
+
*/
|
|
21
|
+
+ (instancetype)automaticPerspectiveCorrectionConfiguration;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
A configuration that will result in no perspective correction being applied.
|
|
25
|
+
*/
|
|
26
|
+
+ (instancetype)noPerspectiveCorrectionConfiguration;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
A configuration that will result in applying the perspective correction defined by the quadrangle.
|
|
30
|
+
*/
|
|
31
|
+
+ (instancetype)perspectiveCorrectionConfigurationWithQuadrangle:(GSKQuadrangle *)quadrangle;
|
|
32
|
+
|
|
33
|
+
@end
|
|
34
|
+
|
|
35
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
//
|
|
2
|
+
// GSKProcessingConfiguration.h
|
|
3
|
+
// GSSDK
|
|
4
|
+
//
|
|
5
|
+
// Created by Bruno Virlet on 16/04/2024.
|
|
6
|
+
// Copyright © 2024 The Grizzly Labs. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
@class GSKPerspectiveCorrectionConfiguration;
|
|
12
|
+
@class GSKCurvatureCorrectionConfiguration;
|
|
13
|
+
@class GSKEnhancementConfiguration;
|
|
14
|
+
@class GSKRotationConfiguration;
|
|
15
|
+
@class GSKOutputConfiguration;
|
|
16
|
+
|
|
17
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
The configuration object to configure the GSKProcessor's behavior.
|
|
21
|
+
|
|
22
|
+
You can use the default constructors.
|
|
23
|
+
*/
|
|
24
|
+
@interface GSKProcessingConfiguration : NSObject
|
|
25
|
+
|
|
26
|
+
+ (instancetype)configurationWithPerspectiveCorrectionConfiguration:(GSKPerspectiveCorrectionConfiguration *)perspectiveCorrectionConfiguration
|
|
27
|
+
curvatureCorrectionConfiguration:(GSKCurvatureCorrectionConfiguration *)curvatureCorrectionConfiguration
|
|
28
|
+
enhancementConfiguration:(GSKEnhancementConfiguration *)enhancementConfiguration
|
|
29
|
+
rotationConfiguration:(GSKRotationConfiguration *)rotationConfiguration
|
|
30
|
+
outputConfiguration:(GSKOutputConfiguration *)outputConfiguration;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
Automatic perspective correction, distortion correction, followed by automatic enhancement and automatic rotation. Output is JPEG.
|
|
34
|
+
*/
|
|
35
|
+
+ (instancetype)defaultConfiguration;
|
|
36
|
+
|
|
37
|
+
/// Specify how to correct perspective distortions present in the scan (such as when the scan was taken with an angle)
|
|
38
|
+
@property (nonatomic, strong, readonly) GSKPerspectiveCorrectionConfiguration *perspectiveCorrectionConfiguration;
|
|
39
|
+
|
|
40
|
+
/// Specify how to correct curvature distortions present in the scan (such as a bent book)
|
|
41
|
+
@property (nonatomic, strong, readonly) GSKCurvatureCorrectionConfiguration *curvatureCorrectionConfiguration;
|
|
42
|
+
|
|
43
|
+
/// The enhancement configuration. This includes the filters enhancing the legibility of the document.
|
|
44
|
+
@property (nonatomic, strong, readonly) GSKEnhancementConfiguration *enhancementConfiguration;
|
|
45
|
+
|
|
46
|
+
/// The rotation configuration. The rotation will be applied after all the other processing.
|
|
47
|
+
@property (nonatomic, strong, readonly) GSKRotationConfiguration *rotationConfiguration;
|
|
48
|
+
|
|
49
|
+
/// Configures the output format of the processing.
|
|
50
|
+
@property (nonatomic, strong, readonly) GSKOutputConfiguration *outputConfiguration;
|
|
51
|
+
|
|
52
|
+
@end
|
|
53
|
+
|
|
54
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
//
|
|
2
|
+
// GSKProcessingResult.h
|
|
3
|
+
// GSSDK
|
|
4
|
+
//
|
|
5
|
+
// Created by Bruno Virlet on 16/04/2024.
|
|
6
|
+
// Copyright © 2024 The Grizzly Labs. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
#import <GSSDK/GSKFilterType.h>
|
|
12
|
+
#import <GSSDK/GSKRotation.h>
|
|
13
|
+
|
|
14
|
+
@class GSKQuadrangle;
|
|
15
|
+
@class GSKFilterConfiguration;
|
|
16
|
+
|
|
17
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
18
|
+
|
|
19
|
+
@interface GSKProcessingResult : NSObject
|
|
20
|
+
/// The output file.
|
|
21
|
+
/// It's located in the temporary directory, so you need to move it to a permanent destination.
|
|
22
|
+
@property (nonatomic, readonly) NSString *processedImagePath;
|
|
23
|
+
|
|
24
|
+
/// The quadrangle that was used for perspective correction
|
|
25
|
+
@property (nonatomic, strong, readonly) GSKQuadrangle *appliedQuadrangle;
|
|
26
|
+
|
|
27
|
+
/// The filter that was applied during the enhancement phase
|
|
28
|
+
@property (nonatomic, assign, readonly) GSKFilterType appliedFilter __deprecated_msg("Use appliedFilterConfiguration instead.");
|
|
29
|
+
|
|
30
|
+
/// The filter that was applied during the enhancement phase
|
|
31
|
+
@property (nonatomic, strong, readonly) GSKFilterConfiguration *appliedFilterConfiguration;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
The rotation applied during the rotation phase.
|
|
35
|
+
|
|
36
|
+
If you specified a rotation angle as part of GSKRotationConfiguration, you will get this angle back here.
|
|
37
|
+
If you requested an automatic orientation detection as part of the GSKRotationConfiguration, appliedRotation will correspond the rotation applied by the SDK
|
|
38
|
+
to rotate the image according to the estimated orientation.
|
|
39
|
+
|
|
40
|
+
Note: The output of the processing is always an up-oriented image, even if the original image had an EXIF orientation (see UIImage's imageOrientation property).
|
|
41
|
+
`appliedRotation` doesn't include the rotation applied to the image buffer to remove the EXIF information. The `appliedRotation` only includes the "visual" rotation
|
|
42
|
+
needed to display the image to the user:
|
|
43
|
+
|
|
44
|
+
- If the input image imageOrientation is UIImageOrientationUp, and you request a clockwise rotation, appliedRotation will be GSKRotationClockwise.
|
|
45
|
+
- If the input image imageOrientation is UIImageOrientationUp, and you request an automatic rotation, which detects that the image must be rotated clockwise to
|
|
46
|
+
look "straight", appliedRotation will be GSKRotationClockwise.
|
|
47
|
+
- If the input image imageOrientation is UIImageOrientationRight, and you request a clockwise rotation, appliedRotation will be GSKRotationClockwise. The output
|
|
48
|
+
image orientation will be UIImageOrientationUp.
|
|
49
|
+
- If the input image imageOrientation is UIImageOrientationUp, and you request an automatic rotation, which detects that the image must be rotated clockwise to
|
|
50
|
+
look "straight", appliedRotation will be GSKRotationClockwise. The output image orientation will be UIImageOrientationUp.
|
|
51
|
+
*/
|
|
52
|
+
@property (nonatomic, assign, readonly) GSKRotation appliedRotation;
|
|
53
|
+
|
|
54
|
+
@end
|
|
55
|
+
|
|
56
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//
|
|
2
|
+
// GSKResizeConfiguration.h
|
|
3
|
+
// GSSDK
|
|
4
|
+
//
|
|
5
|
+
// Created by Bruno Virlet on 16/04/2024.
|
|
6
|
+
// Copyright © 2024 The Grizzly Labs. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
12
|
+
|
|
13
|
+
/// A GSKResizeConfiguration defines the behavior of a GSKScanProcessor when resizing the processed image.
|
|
14
|
+
@interface GSKResizeConfiguration : NSObject
|
|
15
|
+
|
|
16
|
+
- (instancetype)initWithMaxDimension:(NSUInteger)maxDimension;
|
|
17
|
+
|
|
18
|
+
@property (nonatomic, assign, readonly) NSUInteger maxDimension;
|
|
19
|
+
|
|
20
|
+
@end
|
|
21
|
+
|
|
22
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//
|
|
2
|
+
// GSKResizeResult.h
|
|
3
|
+
// GSSDK
|
|
4
|
+
//
|
|
5
|
+
// Created by Bruno Virlet on 16/04/2024.
|
|
6
|
+
// Copyright © 2024 The Grizzly Labs. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
12
|
+
|
|
13
|
+
/// The result of a resizing operation
|
|
14
|
+
@interface GSKResizeResult : NSObject
|
|
15
|
+
|
|
16
|
+
- (instancetype)initWithResizedImagePath:(NSString *)path;
|
|
17
|
+
|
|
18
|
+
@property (nonatomic, readonly) NSString *resizedImagePath;
|
|
19
|
+
|
|
20
|
+
@end
|
|
21
|
+
|
|
22
|
+
NS_ASSUME_NONNULL_END
|
package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKRotation.h
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//
|
|
2
|
+
// GSKRotation.h
|
|
3
|
+
// GSSDK
|
|
4
|
+
//
|
|
5
|
+
// Created by Bruno Virlet on 16/04/2024.
|
|
6
|
+
// Copyright © 2024 The Grizzly Labs. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
#ifndef GSKRotation_h
|
|
12
|
+
#define GSKRotation_h
|
|
13
|
+
|
|
14
|
+
/// Defines an image rotation by increment of 90 degrees.
|
|
15
|
+
typedef NS_ENUM(NSInteger, GSKRotation) {
|
|
16
|
+
GSKRotationNone = 0,
|
|
17
|
+
GSKRotationClockwise = 1,
|
|
18
|
+
GSKRotation180 = 2,
|
|
19
|
+
GSKRotationCounterClockwise = 3
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
#endif /* GSKRotation_h */
|
|
23
|
+
|
|
24
|
+
/// Returns the resulting rotation when applying firstRotation, then secondRotation.
|
|
25
|
+
FOUNDATION_EXPORT GSKRotation GSKCombineRotation(GSKRotation firstRotation, GSKRotation secondRotation);
|
|
26
|
+
/// Returns the resulting rotation when applying firstRotation, then subtracting secondRotation.
|
|
27
|
+
FOUNDATION_EXPORT GSKRotation GSKSubtractRotation(GSKRotation firstRotation, GSKRotation secondRotation);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
//
|
|
2
|
+
// GSKRotationConfiguration.h
|
|
3
|
+
// GSSDK
|
|
4
|
+
//
|
|
5
|
+
// Created by Bruno Virlet on 16/04/2024.
|
|
6
|
+
// Copyright © 2024 The Grizzly Labs. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
|
|
11
|
+
#import <GSSDK/GSKRotation.h>
|
|
12
|
+
|
|
13
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
14
|
+
|
|
15
|
+
/// A GSKRotationConfiguration defines the behavior of a GSKScanProcessor when rotating the processed image.
|
|
16
|
+
@interface GSKRotationConfiguration : NSObject
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
A rotation configuration where no rotation is applied.
|
|
20
|
+
*/
|
|
21
|
+
+ (instancetype)noRotationConfiguration;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
A rotation configuration where Genius Scan automatically detects the document's orientation.
|
|
25
|
+
*/
|
|
26
|
+
+ (instancetype)automaticRotationConfiguration;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
A rotation with a specific angle. No automatic rotation is applied.
|
|
30
|
+
*/
|
|
31
|
+
+ (instancetype)rotationConfigurationWithRotation:(GSKRotation)rotation;
|
|
32
|
+
|
|
33
|
+
@end
|
|
34
|
+
|
|
35
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -12,221 +12,22 @@
|
|
|
12
12
|
#import <UIKit/UIKit.h>
|
|
13
13
|
|
|
14
14
|
#import <GSSDK/GSKFilterType.h>
|
|
15
|
-
#import <GSSDK/
|
|
15
|
+
#import <GSSDK/GSKRotation.h>
|
|
16
16
|
|
|
17
17
|
NS_ASSUME_NONNULL_BEGIN
|
|
18
18
|
|
|
19
|
+
@class GSKCurvatureCorrectionConfiguration;
|
|
20
|
+
@class GSKEnhancementConfiguration;
|
|
21
|
+
@class GSKFilterColorConfiguration;
|
|
22
|
+
@class GSKFilterConfiguration;
|
|
23
|
+
@class GSKOutputConfiguration;
|
|
24
|
+
@class GSKPerspectiveCorrectionConfiguration;
|
|
25
|
+
@class GSKProcessingConfiguration;
|
|
26
|
+
@class GSKProcessingResult;
|
|
19
27
|
@class GSKQuadrangle;
|
|
20
28
|
@class GSKQuadrangleDetectionConfiguration;
|
|
21
|
-
@class
|
|
22
|
-
|
|
23
|
-
/// A GSKCurvatureCorrectionConfiguration defines the behavior of a GSKScanProcessor when applying curvature correction.
|
|
24
|
-
@interface GSKCurvatureCorrectionConfiguration: NSObject
|
|
25
|
-
|
|
26
|
-
/// The default configuration. This currently doesn't apply the curvature correction configuration, but this can change in future versions
|
|
27
|
-
/// of the SDK.
|
|
28
|
-
+ (instancetype)defaultCurvatureCorrectionConfiguration;
|
|
29
|
-
|
|
30
|
-
/// No curvature correction
|
|
31
|
-
+ (instancetype)noCurvatureCorrectionConfiguration;
|
|
32
|
-
|
|
33
|
-
/// Specifies whether or not you want curvature correction
|
|
34
|
-
+ (instancetype)curvatureCorrectionConfigurationWithCurvatureCorrection:(BOOL)curvatureCorrection;
|
|
35
|
-
|
|
36
|
-
@end
|
|
37
|
-
|
|
38
|
-
/// A GSKPerspectiveCorrectionConfiguration defines the behavior of a GSKScanProcessor when applying perspective correction.
|
|
39
|
-
@interface GSKPerspectiveCorrectionConfiguration: NSObject
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
A configuration that will result in the document being auto-detected, and the perspective correction subsequently applied.
|
|
43
|
-
*/
|
|
44
|
-
+ (instancetype)automaticPerspectiveCorrectionConfiguration;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
A configuration that will result in no perspective correction being applied.
|
|
48
|
-
*/
|
|
49
|
-
+ (instancetype)noPerspectiveCorrectionConfiguration;
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
A configuration that will result in applying the perspective correction defined by the quadrangle.
|
|
53
|
-
*/
|
|
54
|
-
+ (instancetype)perspectiveCorrectionConfigurationWithQuadrangle:(GSKQuadrangle *)quadrangle;
|
|
55
|
-
|
|
56
|
-
@end
|
|
57
|
-
|
|
58
|
-
/// A GSKEnhancementConfiguration defines the behavior of a GSKScanProcessor when applying legibility enhancements.
|
|
59
|
-
@interface GSKEnhancementConfiguration: NSObject
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
An enhancement configuration that will result in using the best filter, as detected by the Genius Scan SDK. Edge cleaning will be applied.
|
|
63
|
-
*/
|
|
64
|
-
+ (instancetype)automaticEnhancementConfiguration;
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
An enhancement configuration that will result in using the specified filter.
|
|
68
|
-
*/
|
|
69
|
-
+ (instancetype)enhancementConfigurationWithFilter:(GSKFilterType)filter;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
An enhancement configuration that will result in using the specified filter, applying edge cleaning if requested and if applicable.
|
|
73
|
-
*/
|
|
74
|
-
+ (instancetype)enhancementConfigurationWithFilter:(GSKFilterType)filter cleanEdges:(BOOL)cleanEdges;
|
|
75
|
-
|
|
76
|
-
@end
|
|
77
|
-
|
|
78
|
-
/// Defines an image rotation by increment of 90 degrees.
|
|
79
|
-
typedef NS_ENUM(NSInteger, GSKRotation) {
|
|
80
|
-
GSKRotationNone = 0,
|
|
81
|
-
GSKRotationClockwise = 1,
|
|
82
|
-
GSKRotation180 = 2,
|
|
83
|
-
GSKRotationCounterClockwise = 3
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
/// Returns the resulting rotation when applying firstRotation, then secondRotation.
|
|
87
|
-
FOUNDATION_EXPORT GSKRotation GSKCombineRotation(GSKRotation firstRotation, GSKRotation secondRotation);
|
|
88
|
-
/// Returns the resulting rotation when applying firstRotation, then subtracting secondRotation.
|
|
89
|
-
FOUNDATION_EXPORT GSKRotation GSKSubtractRotation(GSKRotation firstRotation, GSKRotation secondRotation);
|
|
90
|
-
|
|
91
|
-
/// A GSKRotationConfiguration defines the behavior of a GSKScanProcessor when rotating the processed image.
|
|
92
|
-
@interface GSKRotationConfiguration: NSObject
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
A rotation configuration where no rotation is applied.
|
|
96
|
-
*/
|
|
97
|
-
+ (instancetype)noRotationConfiguration;
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
A rotation configuration where Genius Scan automatically detects the document's orientation.
|
|
101
|
-
*/
|
|
102
|
-
+ (instancetype)automaticRotationConfiguration;
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
A rotation with a specific angle. No automatic rotation is applied.
|
|
106
|
-
*/
|
|
107
|
-
+ (instancetype)rotationConfigurationWithRotation:(GSKRotation)rotation;
|
|
108
|
-
|
|
109
|
-
@end
|
|
110
|
-
|
|
111
|
-
/// A GSKResizeConfiguration defines the behavior of a GSKScanProcessor when resizing the processed image.
|
|
112
|
-
@interface GSKResizeConfiguration: NSObject
|
|
113
|
-
|
|
114
|
-
- (instancetype)initWithMaxDimension:(NSUInteger)maxDimension;
|
|
115
|
-
|
|
116
|
-
@property (nonatomic, assign, readonly) NSUInteger maxDimension;
|
|
117
|
-
|
|
118
|
-
@end
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
A configuration that defines the output of the processing.
|
|
122
|
-
*/
|
|
123
|
-
@interface GSKOutputConfiguration: NSObject
|
|
124
|
-
/**
|
|
125
|
-
JPEG for color images.
|
|
126
|
-
PNG for monochrome images.
|
|
127
|
-
A default, sensible configuration: jpegQuality: 0.60
|
|
128
|
-
*/
|
|
129
|
-
+ (instancetype)defaultConfiguration;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
JPEG for color images with the specified quality.
|
|
133
|
-
PNG for monochrome images.
|
|
134
|
-
*/
|
|
135
|
-
+ (instancetype)automaticConfigurationWithJPEGQuality:(CGFloat)quality;
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
/// Image output will be JPEG, quality 0.60.
|
|
139
|
-
+ (instancetype)jpegOutputConfiguration;
|
|
140
|
-
|
|
141
|
-
/// Image output will be JPEG with specified quality.
|
|
142
|
-
+ (instancetype)jpegOutputConfigurationWithQuality:(CGFloat)quality;
|
|
143
|
-
|
|
144
|
-
/// Image output will be PNG.
|
|
145
|
-
+ (instancetype)pngOutputConfiguration;
|
|
146
|
-
|
|
147
|
-
@end
|
|
148
|
-
|
|
149
|
-
@interface GSKProcessingResult: NSObject
|
|
150
|
-
/// The output file.
|
|
151
|
-
/// It's located in the temporary directory, so you need to move it to a permanent destination.
|
|
152
|
-
@property (nonatomic, readonly) NSString *processedImagePath;
|
|
153
|
-
|
|
154
|
-
/// The quadrangle that was used for perspective correction
|
|
155
|
-
@property (nonatomic, strong, readonly) GSKQuadrangle *appliedQuadrangle;
|
|
156
|
-
|
|
157
|
-
/// The filter that was applied during the enhancement phase
|
|
158
|
-
@property (nonatomic, assign, readonly) GSKFilterType appliedFilter;
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
The rotation applied during the rotation phase.
|
|
162
|
-
|
|
163
|
-
If you specified a rotation angle as part of GSKRotationConfiguration, you will get this angle back here.
|
|
164
|
-
If you requested an automatic orientation detection as part of the GSKRotationConfiguration, appliedRotation will correspond the rotation applied by the SDK
|
|
165
|
-
to rotate the image according to the estimated orientation.
|
|
166
|
-
|
|
167
|
-
Note: The output of the processing is always an up-oriented image, even if the original image had an EXIF orientation (see UIImage's imageOrientation property).
|
|
168
|
-
`appliedRotation` doesn't include the rotation applied to the image buffer to remove the EXIF information. The `appliedRotation` only includes the "visual" rotation
|
|
169
|
-
needed to display the image to the user:
|
|
170
|
-
|
|
171
|
-
- If the input image imageOrientation is UIImageOrientationUp, and you request a clockwise rotation, appliedRotation will be GSKRotationClockwise.
|
|
172
|
-
- If the input image imageOrientation is UIImageOrientationUp, and you request an automatic rotation, which detects that the image must be rotated clockwise to
|
|
173
|
-
look "straight", appliedRotation will be GSKRotationClockwise.
|
|
174
|
-
- If the input image imageOrientation is UIImageOrientationRight, and you request a clockwise rotation, appliedRotation will be GSKRotationClockwise. The output
|
|
175
|
-
image orientation will be UIImageOrientationUp.
|
|
176
|
-
- If the input image imageOrientation is UIImageOrientationUp, and you request an automatic rotation, which detects that the image must be rotated clockwise to
|
|
177
|
-
look "straight", appliedRotation will be GSKRotationClockwise. The output image orientation will be UIImageOrientationUp.
|
|
178
|
-
*/
|
|
179
|
-
@property (nonatomic, assign, readonly) GSKRotation appliedRotation;
|
|
180
|
-
|
|
181
|
-
@end
|
|
182
|
-
|
|
183
|
-
/// The result of a resizing operation
|
|
184
|
-
@interface GSKResizeResult: NSObject
|
|
185
|
-
|
|
186
|
-
- (instancetype)initWithResizedImagePath:(NSString *)path;
|
|
187
|
-
|
|
188
|
-
@property (nonatomic, readonly) NSString *resizedImagePath;
|
|
189
|
-
|
|
190
|
-
@end
|
|
191
|
-
|
|
192
|
-
// MARK: -
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
The configuration object to configure the GSKProcessor's behavior.
|
|
196
|
-
|
|
197
|
-
You can use the default constructors.
|
|
198
|
-
*/
|
|
199
|
-
@interface GSKProcessingConfiguration : NSObject
|
|
200
|
-
|
|
201
|
-
+ (instancetype)configurationWithPerspectiveCorrectionConfiguration:(GSKPerspectiveCorrectionConfiguration *)perspectiveCorrectionConfiguration
|
|
202
|
-
curvatureCorrectionConfiguration:(GSKCurvatureCorrectionConfiguration *)curvatureCorrectionConfiguration
|
|
203
|
-
enhancementConfiguration:(GSKEnhancementConfiguration *)enhancementConfiguration
|
|
204
|
-
rotationConfiguration:(GSKRotationConfiguration *)rotationConfiguration
|
|
205
|
-
outputConfiguration:(GSKOutputConfiguration *)outputConfiguration;
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
Automatic perspective correction, distortion correction, followed by automatic enhancement and automatic rotation. Output is JPEG.
|
|
209
|
-
*/
|
|
210
|
-
+ (instancetype)defaultConfiguration;
|
|
211
|
-
|
|
212
|
-
/// Specify how to correct perspective distortions present in the scan (such as when the scan was taken with an angle)
|
|
213
|
-
@property (nonatomic, strong, readonly) GSKPerspectiveCorrectionConfiguration *perspectiveCorrectionConfiguration;
|
|
214
|
-
|
|
215
|
-
/// Specify how to correct curvature distortions present in the scan (such as a bent book)
|
|
216
|
-
@property (nonatomic, strong, readonly) GSKCurvatureCorrectionConfiguration *curvatureCorrectionConfiguration;
|
|
217
|
-
|
|
218
|
-
/// The enhancement configuration. This includes the filters enhancing the legibility of the document.
|
|
219
|
-
@property (nonatomic, strong, readonly) GSKEnhancementConfiguration *enhancementConfiguration;
|
|
220
|
-
|
|
221
|
-
/// The rotation configuration. The rotation will be applied after all the other processing.
|
|
222
|
-
@property (nonatomic, strong, readonly) GSKRotationConfiguration *rotationConfiguration;
|
|
223
|
-
|
|
224
|
-
/// Configures the output format of the processing.
|
|
225
|
-
@property (nonatomic, strong, readonly) GSKOutputConfiguration *outputConfiguration;
|
|
226
|
-
|
|
227
|
-
@end
|
|
228
|
-
|
|
229
|
-
// MARK: -
|
|
29
|
+
@class GSKResizeConfiguration;
|
|
30
|
+
@class GSKResizeResult;
|
|
230
31
|
|
|
231
32
|
/**
|
|
232
33
|
The document processor is the central class of the GSSDK's image processing algorithms.
|