@thegrizzlylabs/react-native-genius-scan 5.0.2 → 5.0.3

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.
Files changed (52) hide show
  1. package/android/build.gradle +1 -1
  2. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/GSSDK +0 -0
  3. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/GSSDK_GSSDKObjC.bundle/PrivacyInfo.xcprivacy +19 -0
  4. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/GSSDK_GSSDKObjC.bundle/en.lproj/GSSDK.strings +0 -0
  5. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKBackgroundKind.h +14 -0
  6. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKDefaultLogger.h +1 -1
  7. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKDocumentComposition.h +16 -0
  8. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKDocumentDetector.h +3 -0
  9. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKEdgeCleaning.h +14 -0
  10. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKFilterColorPalette.h +13 -0
  11. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKFilterStyle.h +19 -0
  12. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKFilterType.h +11 -1
  13. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKLog.h +2 -0
  14. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKLogger.h +4 -0
  15. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSKScanProcessor.h +28 -7
  16. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK-Swift.h +207 -11
  17. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Headers/GSSDK.h +22 -20
  18. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Info.plist +0 -0
  19. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.abi.json +5512 -1646
  20. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +131 -7
  21. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  22. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios.swiftinterface +131 -7
  23. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/PrivacyInfo.xcprivacy +19 -0
  24. package/ios/GSSDK/GSSDK.xcframework/ios-arm64/GSSDK.framework/en.lproj/GSSDK.strings +0 -0
  25. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/GSSDK +0 -0
  26. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/GSSDK_GSSDKObjC.bundle/PrivacyInfo.xcprivacy +19 -0
  27. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/GSSDK_GSSDKObjC.bundle/en.lproj/GSSDK.strings +0 -0
  28. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKBackgroundKind.h +14 -0
  29. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKDefaultLogger.h +1 -1
  30. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKDocumentComposition.h +16 -0
  31. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKDocumentDetector.h +3 -0
  32. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKEdgeCleaning.h +14 -0
  33. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKFilterColorPalette.h +13 -0
  34. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKFilterStyle.h +19 -0
  35. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKFilterType.h +11 -1
  36. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKLog.h +2 -0
  37. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKLogger.h +4 -0
  38. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSKScanProcessor.h +28 -7
  39. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK-Swift.h +414 -22
  40. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Headers/GSSDK.h +22 -20
  41. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Info.plist +0 -0
  42. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +5512 -1646
  43. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +131 -7
  44. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  45. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +131 -7
  46. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +5512 -1646
  47. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +131 -7
  48. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  49. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/Modules/GSSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +131 -7
  50. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/PrivacyInfo.xcprivacy +19 -0
  51. package/ios/GSSDK/GSSDK.xcframework/ios-arm64_x86_64-simulator/GSSDK.framework/en.lproj/GSSDK.strings +0 -0
  52. package/package.json +1 -1
@@ -41,5 +41,5 @@ rootProject.allprojects {
41
41
 
42
42
  dependencies {
43
43
  implementation 'com.facebook.react:react-native:+'
44
- implementation 'com.geniusscansdk:gssdk:5.0.2'
44
+ implementation 'com.geniusscansdk:gssdk:5.0.3'
45
45
  }
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>NSPrivacyTracking</key>
6
+ <false/>
7
+ <key>NSPrivacyAccessedAPITypes</key>
8
+ <array>
9
+ <dict>
10
+ <key>NSPrivacyAccessedAPIType</key>
11
+ <string>NSPrivacyAccessedAPICategoryUserDefaults</string>
12
+ <key>NSPrivacyAccessedAPITypeReasons</key>
13
+ <array>
14
+ <string>CA92.1</string>
15
+ </array>
16
+ </dict>
17
+ </array>
18
+ </dict>
19
+ </plist>
@@ -0,0 +1,14 @@
1
+ #ifndef GSKBackgroundKind_h
2
+ #define GSKBackgroundKind_h
3
+
4
+ /**
5
+ Defines the document's background.
6
+ */
7
+ typedef NS_ENUM(NSInteger, GSKBackgroundKind) {
8
+ /// A light background. Typically white or a very pale color. This is the most common type of documents and is the default.
9
+ GSKBackgroundKindLight,
10
+ /// A dark background. Typically, a business card with a black background.
11
+ GSKBackgroundKindDark
12
+ };
13
+
14
+ #endif /* GSKBackgroundKind_h */
@@ -1,4 +1,4 @@
1
- #import <GSSDK/GSSDK.h>
1
+ #import <GSSDK/GSKLogger.h>
2
2
 
3
3
  /**
4
4
  A convenience logger that logs everything using NSLog.
@@ -0,0 +1,16 @@
1
+ #import <Foundation/Foundation.h>
2
+
3
+ #ifndef GSKDocumentComposition_h
4
+ #define GSKDocumentComposition_h
5
+
6
+ /// Scanned documents can be text-only like a novel page, but can also include various illustrations.
7
+ /// The filter detector can estimate the document composition.
8
+ /// The scan processor can use the document composition to better enhance the scans.
9
+ typedef NS_ENUM(NSInteger, GSKDocumentComposition) {
10
+ /// A document composed of text only.
11
+ GSKDocumentCompositionText,
12
+ /// A document composed of a mix of text and photos, illustrations.
13
+ GSKDocumentCompositionTextAndPhoto
14
+ };
15
+
16
+ #endif /* GSKDocumentComposition_h */
@@ -18,6 +18,9 @@
18
18
 
19
19
  NS_ASSUME_NONNULL_BEGIN
20
20
 
21
+ /**
22
+ A configuration for the document detector.
23
+ */
21
24
  @interface GSKDocumentDetectorConfiguration: NSObject
22
25
 
23
26
  + (instancetype)defaultConfiguration;
@@ -0,0 +1,14 @@
1
+ #import <Foundation/Foundation.h>
2
+
3
+ #ifndef GSKEdgeCleaning_h
4
+ #define GSKEdgeCleaning_h
5
+
6
+ /**
7
+ Edge cleaning is a process that cleans the document's outline.
8
+ */
9
+ typedef NS_ENUM(NSInteger, GSKEdgeCleaning) {
10
+ GSKEdgeCleaningDisabled,
11
+ GSKEdgeCleaningEnabled
12
+ };
13
+
14
+ #endif /* GSKEdgeCleaning_h */
@@ -0,0 +1,13 @@
1
+ #import <Foundation/Foundation.h>
2
+
3
+ /**
4
+ The different possible values for a color palette.
5
+ */
6
+ typedef NS_CLOSED_ENUM(NSInteger, GSKFilterColorPalette) {
7
+ /// Monochrome (black or white)
8
+ GSKFilterColorPaletteMonochrome,
9
+ /// Grayscale (256 shades of gray)
10
+ GSKFilterColorPaletteGrayscale,
11
+ /// Color
12
+ GSKFilterColorPaletteColor
13
+ };
@@ -0,0 +1,19 @@
1
+ //
2
+ // GSKFilterStyle.h
3
+ // GSSDK
4
+ //
5
+ // Created by Bruno Virlet on 27/03/2024.
6
+ // Copyright © 2024 The Grizzly Labs. All rights reserved.
7
+ //
8
+
9
+ #ifndef GSKFilterStyle_h
10
+ #define GSKFilterStyle_h
11
+
12
+ /// Style for the magic filter
13
+ typedef NS_CLOSED_ENUM(NSInteger, GSKFilterStyle) {
14
+ /// Hint that the scan should be enhanced as a document
15
+ /// (e.g. apply background cleaning)
16
+ GSKFilterStyleDocument
17
+ };
18
+
19
+ #endif /* GSKFilterStyle_h */
@@ -11,7 +11,9 @@
11
11
  #define GSKFilterType_h
12
12
 
13
13
  /**
14
- The different possible enhancements
14
+ The different possible enhancements.
15
+
16
+ Deprecated in favor of GSKFilterConfiguration.
15
17
  */
16
18
  typedef NS_CLOSED_ENUM(NSInteger, GSKFilterType) {
17
19
  /// No post processing
@@ -19,13 +21,21 @@ typedef NS_CLOSED_ENUM(NSInteger, GSKFilterType) {
19
21
  /**
20
22
  The black and white enhancement results in a mostly black and white image but gray levels
21
23
  are used for antialiasing. The background is turned white.
24
+
25
+ Deprecated in favor of GSKEnhancementConfiguration.automatic(with: .grayscale)
22
26
  */
23
27
  GSKFilterBlackAndWhite,
24
28
  /// Turns the background white but preserves the color.
29
+ ///
30
+ /// Deprecated in favor of GSKEnhancementConfiguration.automatic(with: .color)
25
31
  GSKFilterColor,
26
32
  /// Enhancement to apply to photographs.
33
+ ///
34
+ /// Deprecated in favor of GSKEnhancementConfiguration.withFilterConfiguration(.photo)
27
35
  GSKFilterPhoto,
28
36
  /// Monochrome enhancement. The resulting image contains only two colors.
37
+ ///
38
+ /// Deprecated in favor of GSKEnhancementConfiguration.automatic(with: .monochrome)
29
39
  GSKFilterMonochrome,
30
40
  };
31
41
 
@@ -23,6 +23,8 @@ NS_ASSUME_NONNULL_BEGIN
23
23
  */
24
24
  @property (class, nonatomic, nullable) id<GSKLogger> logger;
25
25
 
26
+ /// The defaut log level used if `logger` doesn't implement `logLevel`.
27
+ @property (class, nonatomic, readonly) GSKLoggerSeverity defaultLogLevel;
26
28
  /**
27
29
  Log a verbose message directly to the SDK logger.
28
30
 
@@ -15,6 +15,10 @@
15
15
 
16
16
  - (void)log:(NSString *)message severity:(GSKLoggerSeverity)severity;
17
17
 
18
+ @optional
19
+ /// Only log messages with a severity greater than `logLevel` will be sent to this logger.
20
+ @property (nonatomic, readonly) GSKLoggerSeverity logLevel;
21
+
18
22
  @end
19
23
 
20
24
  #endif /* GSKLogger_h */
@@ -11,15 +11,21 @@
11
11
  #import <Foundation/Foundation.h>
12
12
  #import <UIKit/UIKit.h>
13
13
 
14
- #import <GSSDK/GSKFilterType.h>
15
14
  #import <GSSDK/GSKDetectQuadrangleOptions.h>
15
+ #import <GSSDK/GSKEdgeCleaning.h>
16
+ #import <GSSDK/GSKFilterColorPalette.h>
17
+ #import <GSSDK/GSKFilterStyle.h>
18
+ #import <GSSDK/GSKFilterType.h>
16
19
 
17
20
  NS_ASSUME_NONNULL_BEGIN
18
21
 
22
+ @class GSKFilterColorConfiguration;
23
+ @class GSKFilterConfiguration;
19
24
  @class GSKQuadrangle;
20
25
  @class GSKQuadrangleDetectionConfiguration;
21
26
  @class GSKPerspectiveCorrectionConfiguration;
22
27
 
28
+
23
29
  /// A GSKCurvatureCorrectionConfiguration defines the behavior of a GSKScanProcessor when applying curvature correction.
24
30
  @interface GSKCurvatureCorrectionConfiguration: NSObject
25
31
 
@@ -59,19 +65,31 @@ NS_ASSUME_NONNULL_BEGIN
59
65
  @interface GSKEnhancementConfiguration: NSObject
60
66
 
61
67
  /**
62
- An enhancement configuration that will result in using the best filter, as detected by the Genius Scan SDK. Edge cleaning will be applied.
68
+ An enhancement configuration that will result in using the best filter, as detected by the Genius Scan SDK.
63
69
  */
64
70
  + (instancetype)automaticEnhancementConfiguration;
65
71
 
66
72
  /**
67
- An enhancement configuration that will result in using the specified filter.
73
+ An enhancement configuration that will result in using the best filter, as detected by the Genius Scan SDK while taking in account the specified constraints.
74
+ */
75
+ + (instancetype)automaticEnhancementConfigurationWithFilterStyle:(GSKFilterStyle)FilterStyle colorPalette:(GSKFilterColorPalette)colorPalette NS_SWIFT_NAME(automatic(filterStyle:colorPalette:));
76
+
77
+ /**
78
+ An enhancement configuration that will result in using the best filter, as detected by the Genius Scan SDK while taking in account the specified constraints.
68
79
  */
69
- + (instancetype)enhancementConfigurationWithFilter:(GSKFilterType)filter;
80
+ + (instancetype)automaticEnhancementConfigurationWithColorPalette:(GSKFilterColorPalette)colorPalette NS_SWIFT_NAME(automatic(colorPalette:));
70
81
 
71
82
  /**
72
- An enhancement configuration that will result in using the specified filter, applying edge cleaning if requested and if applicable.
83
+ An enhancement configuration that will result in using the specified legacy filter.
84
+
85
+ Deprecated.
73
86
  */
74
- + (instancetype)enhancementConfigurationWithFilter:(GSKFilterType)filter cleanEdges:(BOOL)cleanEdges;
87
+ + (instancetype)enhancementConfigurationWithFilter:(GSKFilterType)filter DEPRECATED_MSG_ATTRIBUTE("Use `filterConfiguration` instead.");
88
+
89
+ /**
90
+ An enhancement configuration that will result in using the specified filter.
91
+ */
92
+ + (instancetype)fixedEnhancementConfigurationWithFilterConfiguration:(GSKFilterConfiguration *)filterConfiguration NS_SWIFT_NAME(fixed(filterConfiguration:));
75
93
 
76
94
  @end
77
95
 
@@ -155,7 +173,10 @@ FOUNDATION_EXPORT GSKRotation GSKSubtractRotation(GSKRotation firstRotation, GSK
155
173
  @property (nonatomic, strong, readonly) GSKQuadrangle *appliedQuadrangle;
156
174
 
157
175
  /// The filter that was applied during the enhancement phase
158
- @property (nonatomic, assign, readonly) GSKFilterType appliedFilter;
176
+ @property (nonatomic, assign, readonly) GSKFilterType appliedFilter __deprecated_msg("Use appliedFilterConfiguration instead.");
177
+
178
+ /// The filter that was applied during the enhancement phase
179
+ @property (nonatomic, strong, readonly) GSKFilterConfiguration *appliedFilterConfiguration;
159
180
 
160
181
  /**
161
182
  The rotation applied during the rotation phase.
@@ -277,6 +277,7 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
277
277
  #if __has_warning("-Watimport-in-framework-header")
278
278
  #pragma clang diagnostic ignored "-Watimport-in-framework-header"
279
279
  #endif
280
+ @import CoreFoundation;
280
281
  @import Dispatch;
281
282
  @import Foundation;
282
283
  @import ObjectiveC;
@@ -425,6 +426,183 @@ SWIFT_PROTOCOL("_TtP5GSSDK25GSKDocumentImageProcessor_")
425
426
  @end
426
427
 
427
428
 
429
+ /// A configuration to specify the background cleaning to apply with GSKScanProcessor.
430
+ SWIFT_CLASS("_TtC5GSSDK40GSKFilterBackgroundCleaningConfiguration")
431
+ @interface GSKFilterBackgroundCleaningConfiguration : NSObject
432
+ /// Determines if the edges of the document must be cleaned or not. Cleaning the edges might result in erasing
433
+ /// some information that’s close the edges but yields a much cleaner document.
434
+ @property (nonatomic, readonly) GSKEdgeCleaning edgeCleaning;
435
+ /// Determines if the document’s background is rather light (white) or dark (black).
436
+ @property (nonatomic, readonly) GSKBackgroundKind backgroundKind;
437
+ /// Determines if the document is composed mainly of text, or contains a mix of text and photos.
438
+ @property (nonatomic, readonly) GSKDocumentComposition documentComposition;
439
+ /// Determines the strength of the background cleaning. Value between 0 and 1.
440
+ @property (nonatomic, readonly) CGFloat strength;
441
+ /// \param edgeCleaning If enabled, the document edges will be cleaned up. This helps if the document is torn or folded in
442
+ /// the corners, of if the cropping wasn’t perfectly accurate.
443
+ ///
444
+ /// \param backgroundKind If set to dark, the document is considered as having a dark background, and will be processed
445
+ /// consequently.
446
+ ///
447
+ /// \param documentComposition If set to “Text and photo”, indicates that document is a composite of text and photos (such
448
+ /// as a magazine page). The filter will be less aggressive to preserve the photos.
449
+ ///
450
+ /// \param strength The strength of the filter, between 0 and 1.
451
+ ///
452
+ - (nonnull instancetype)initWithEdgeCleaning:(GSKEdgeCleaning)edgeCleaning backgroundKind:(GSKBackgroundKind)backgroundKind documentComposition:(GSKDocumentComposition)documentComposition strength:(CGFloat)strength OBJC_DESIGNATED_INITIALIZER;
453
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
454
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
455
+ @end
456
+
457
+
458
+ @interface GSKFilterBackgroundCleaningConfiguration (SWIFT_EXTENSION(GSSDK))
459
+ @property (nonatomic, readonly, copy) NSString * _Nonnull description;
460
+ @end
461
+
462
+
463
+ @interface GSKFilterBackgroundCleaningConfiguration (SWIFT_EXTENSION(GSSDK))
464
+ - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
465
+ @property (nonatomic, readonly) NSUInteger hash;
466
+ @end
467
+
468
+
469
+ /// A configuration to determine the colors of the output of the GSKScanProcessor.
470
+ SWIFT_CLASS("_TtC5GSSDK27GSKFilterColorConfiguration")
471
+ @interface GSKFilterColorConfiguration : NSObject
472
+ /// A configuration that results in a monochrome document.
473
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterColorConfiguration * _Nonnull monochrome;)
474
+ + (GSKFilterColorConfiguration * _Nonnull)monochrome SWIFT_WARN_UNUSED_RESULT;
475
+ /// A configuration that results in a grayscale document.
476
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterColorConfiguration * _Nonnull grayscale;)
477
+ + (GSKFilterColorConfiguration * _Nonnull)grayscale SWIFT_WARN_UNUSED_RESULT;
478
+ /// A configuration that results in a color document.
479
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterColorConfiguration * _Nonnull color;)
480
+ + (GSKFilterColorConfiguration * _Nonnull)color SWIFT_WARN_UNUSED_RESULT;
481
+ /// The palette of colors
482
+ @property (nonatomic, readonly) GSKFilterColorPalette palette;
483
+ - (nonnull instancetype)initWithPalette:(GSKFilterColorPalette)palette OBJC_DESIGNATED_INITIALIZER;
484
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
485
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
486
+ @end
487
+
488
+
489
+ @interface GSKFilterColorConfiguration (SWIFT_EXTENSION(GSSDK))
490
+ @property (nonatomic, readonly, copy) NSString * _Nonnull description;
491
+ @end
492
+
493
+
494
+ @interface GSKFilterColorConfiguration (SWIFT_EXTENSION(GSSDK))
495
+ - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
496
+ @property (nonatomic, readonly) NSUInteger hash;
497
+ @end
498
+
499
+ @class GSKFilterLightingCorrectionConfiguration;
500
+
501
+ /// The configuration to use when applying a document enhancement filter.
502
+ SWIFT_CLASS("_TtC5GSSDK22GSKFilterConfiguration")
503
+ @interface GSKFilterConfiguration : NSObject
504
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterConfiguration * _Nonnull noOp;)
505
+ + (GSKFilterConfiguration * _Nonnull)noOp SWIFT_WARN_UNUSED_RESULT;
506
+ /// A photo filter configuration (no background cleaning)
507
+ /// \param lightingCorrectionConfiguration an optional lighting correction configuration. If nil, no correction is applied.
508
+ ///
509
+ /// \param colorConfiguration an optional color configuration. If nil, the color configuration is used.
510
+ ///
511
+ + (GSKFilterConfiguration * _Nonnull)photoWithLightingCorrectionConfiguration:(GSKFilterLightingCorrectionConfiguration * _Nullable)lightingCorrectionConfiguration colorConfiguration:(GSKFilterColorConfiguration * _Nullable)colorConfiguration SWIFT_WARN_UNUSED_RESULT;
512
+ /// The lighting configuration
513
+ /// Determines the parameters to tune the image levels, contrast.
514
+ @property (nonatomic, readonly, strong) GSKFilterLightingCorrectionConfiguration * _Nullable lightingCorrectionConfiguration;
515
+ /// The background cleaning configuration
516
+ /// Determines the cleaning up of the document’s background.
517
+ @property (nonatomic, readonly, strong) GSKFilterBackgroundCleaningConfiguration * _Nullable backgroundCleaningConfiguration;
518
+ /// The color configuration
519
+ /// Determines the filter’s output colors.
520
+ @property (nonatomic, readonly, strong) GSKFilterColorConfiguration * _Nullable colorConfiguration;
521
+ + (GSKFilterConfiguration * _Nonnull)configurationWithLightingCorrectionConfiguration:(GSKFilterLightingCorrectionConfiguration * _Nullable)lightingCorrectionConfiguration backgroundCleaningConfiguration:(GSKFilterBackgroundCleaningConfiguration * _Nullable)backgroundCleaningConfiguration colorConfiguration:(GSKFilterColorConfiguration * _Nullable)colorConfiguration SWIFT_WARN_UNUSED_RESULT;
522
+ /// A filter configuration.
523
+ /// \param lightingCorrectionConfiguration an optional lighting correction configuration. If nil, no correction is applied.
524
+ ///
525
+ /// \param backgroundCleaningConfiguration an optional background cleaning configuration. If nil, no background
526
+ /// cleaning is applied.
527
+ ///
528
+ /// \param colorConfiguration an optional color configuration. If nil, the color configuration is used.
529
+ ///
530
+ - (nonnull instancetype)initWithLightingCorrectionConfiguration:(GSKFilterLightingCorrectionConfiguration * _Nullable)lightingCorrectionConfiguration backgroundCleaningConfiguration:(GSKFilterBackgroundCleaningConfiguration * _Nullable)backgroundCleaningConfiguration colorConfiguration:(GSKFilterColorConfiguration * _Nullable)colorConfiguration OBJC_DESIGNATED_INITIALIZER;
531
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
532
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
533
+ @end
534
+
535
+
536
+ @interface GSKFilterConfiguration (SWIFT_EXTENSION(GSSDK))
537
+ - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
538
+ @property (nonatomic, readonly) NSUInteger hash;
539
+ @end
540
+
541
+
542
+ @interface GSKFilterConfiguration (SWIFT_EXTENSION(GSSDK))
543
+ /// A soft document filter resulting in a grayscale document.
544
+ /// This filter is ideal for documents with light print such as carbon copy,
545
+ /// documents with pale text that you need to preserve, or documents where the
546
+ /// text has little contrast with the background.
547
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterConfiguration * _Nonnull softGrayscale;)
548
+ + (GSKFilterConfiguration * _Nonnull)softGrayscale SWIFT_WARN_UNUSED_RESULT;
549
+ /// A soft document filter resulting in a color document.
550
+ /// This filter is ideal for documents that mix text and images and it also preserves
551
+ /// text with low contrast.
552
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterConfiguration * _Nonnull softColor;)
553
+ + (GSKFilterConfiguration * _Nonnull)softColor SWIFT_WARN_UNUSED_RESULT;
554
+ /// A strong document filter resulting in a monochrome document.
555
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterConfiguration * _Nonnull strongMonochrome;)
556
+ + (GSKFilterConfiguration * _Nonnull)strongMonochrome SWIFT_WARN_UNUSED_RESULT;
557
+ /// A strong document filter resulting in a grayscale document.
558
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterConfiguration * _Nonnull strongGrayscale;)
559
+ + (GSKFilterConfiguration * _Nonnull)strongGrayscale SWIFT_WARN_UNUSED_RESULT;
560
+ /// A strong document filter resulting in a color document.
561
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterConfiguration * _Nonnull strongColor;)
562
+ + (GSKFilterConfiguration * _Nonnull)strongColor SWIFT_WARN_UNUSED_RESULT;
563
+ /// A filter specially designed for photos.
564
+ /// Unlike document filters, this filter will not attempt any background cleaning but will
565
+ /// slightly improve the lighting of the image.
566
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterConfiguration * _Nonnull photo;)
567
+ + (GSKFilterConfiguration * _Nonnull)photo SWIFT_WARN_UNUSED_RESULT;
568
+ /// A filter specially designed to treat documents with a dark background, in particular white text
569
+ /// over a black background.
570
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterConfiguration * _Nonnull darkBackground;)
571
+ + (GSKFilterConfiguration * _Nonnull)darkBackground SWIFT_WARN_UNUSED_RESULT;
572
+ @end
573
+
574
+
575
+ /// A configuration to adjust the lighting of a document with GSKScanProcessor.
576
+ SWIFT_CLASS("_TtC5GSSDK40GSKFilterLightingCorrectionConfiguration")
577
+ @interface GSKFilterLightingCorrectionConfiguration : NSObject
578
+ /// A configuration that doesn’t adjust the lighting of a document.
579
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterLightingCorrectionConfiguration * _Nonnull noOp;)
580
+ + (GSKFilterLightingCorrectionConfiguration * _Nonnull)noOp SWIFT_WARN_UNUSED_RESULT;
581
+ /// A configuration to adjust the lighting of document containing text.
582
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterLightingCorrectionConfiguration * _Nonnull textDocument;)
583
+ + (GSKFilterLightingCorrectionConfiguration * _Nonnull)textDocument SWIFT_WARN_UNUSED_RESULT;
584
+ /// A configuration to adjust the lighting of a document looking like a photo.
585
+ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GSKFilterLightingCorrectionConfiguration * _Nonnull photos;)
586
+ + (GSKFilterLightingCorrectionConfiguration * _Nonnull)photos SWIFT_WARN_UNUSED_RESULT;
587
+ @property (nonatomic, readonly) CGFloat minThreshold;
588
+ @property (nonatomic, readonly) CGFloat maxThreshold;
589
+ - (nonnull instancetype)initWithMinThreshold:(CGFloat)minThreshold maxThreshold:(CGFloat)maxThreshold OBJC_DESIGNATED_INITIALIZER;
590
+ - (nonnull instancetype)init SWIFT_UNAVAILABLE;
591
+ + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
592
+ @end
593
+
594
+
595
+ @interface GSKFilterLightingCorrectionConfiguration (SWIFT_EXTENSION(GSSDK))
596
+ @property (nonatomic, readonly, copy) NSString * _Nonnull description;
597
+ @end
598
+
599
+
600
+ @interface GSKFilterLightingCorrectionConfiguration (SWIFT_EXTENSION(GSSDK))
601
+ - (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT;
602
+ @property (nonatomic, readonly) NSUInteger hash;
603
+ @end
604
+
605
+
428
606
 
429
607
  /// Internal use.
430
608
  SWIFT_CLASS("_TtC5GSSDK22GSKLicenseKeyRefresher")
@@ -678,11 +856,6 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
678
856
  @end
679
857
 
680
858
 
681
- @interface GSKScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
682
- - (BOOL)validate:(NSError * _Nullable * _Nullable)error;
683
- @end
684
-
685
-
686
859
  @interface GSKScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
687
860
  /// Create a configuration from a dictionary.
688
861
  /// This is particularly useful for interfacing with React Native but shouldn’t
@@ -692,6 +865,11 @@ SWIFT_CLASS("_TtC5GSSDK24GSKScanFlowConfiguration")
692
865
 
693
866
 
694
867
 
868
+ @interface GSKScanFlowConfiguration (SWIFT_EXTENSION(GSSDK))
869
+ - (BOOL)validate:(NSError * _Nullable * _Nullable)error;
870
+ @end
871
+
872
+
695
873
  /// Enum that defines various errors that can occur during a scan flow.
696
874
  typedef SWIFT_ENUM(NSInteger, GSKScanFlowError, open) {
697
875
  /// User has canceled the scan flow
@@ -704,12 +882,30 @@ typedef SWIFT_ENUM(NSInteger, GSKScanFlowError, open) {
704
882
  /// The different possible filters for the scanner UI.
705
883
  /// All cases match <code>GSKFilterType</code> values except <code>.automatic</code>.
706
884
  typedef SWIFT_ENUM(NSInteger, GSKScanFlowFilterType, open) {
707
- GSKScanFlowFilterAutomatic SWIFT_COMPILE_NAME("automatic") = 0,
708
- GSKScanFlowFilterNone SWIFT_COMPILE_NAME("none") = 1,
709
- GSKScanFlowFilterBlackAndWhite SWIFT_COMPILE_NAME("blackAndWhite") = 2,
710
- GSKScanFlowFilterColor SWIFT_COMPILE_NAME("color") = 3,
711
- GSKScanFlowFilterPhoto SWIFT_COMPILE_NAME("photo") = 4,
712
- GSKScanFlowFilterMonochrome SWIFT_COMPILE_NAME("monochrome") = 5,
885
+ GSKScanFlowFilterNone SWIFT_COMPILE_NAME("none") = 0,
886
+ /// Automatic filter
887
+ GSKScanFlowFilterAutomatic SWIFT_COMPILE_NAME("automatic") = 1,
888
+ /// Automatic filter with a monochrome output
889
+ GSKScanFlowFilterAutomaticDocumentMonochrome SWIFT_COMPILE_NAME("automaticDocumentMonochrome") = 2,
890
+ /// Automatic filter with a grayscale output
891
+ GSKScanFlowFilterAutomaticDocumentGrayscale SWIFT_COMPILE_NAME("automaticDocumentGrayscale") = 3,
892
+ /// Automatic filter with a color output
893
+ GSKScanFlowFilterAutomaticDocumentColor SWIFT_COMPILE_NAME("automaticDocumentColor") = 4,
894
+ /// A soft gray scale filter, ideal for documents containing both text and photos, or for text documents with
895
+ /// a low-contrast between the text and the background.
896
+ GSKScanFlowFilterSoftGrayscale SWIFT_COMPILE_NAME("softGrayscale") = 5,
897
+ /// A soft color filter, ideal for documents containing both text and photos
898
+ GSKScanFlowFilterSoftColor SWIFT_COMPILE_NAME("softColor") = 6,
899
+ /// A strong monochrome filter, ideal for text documents
900
+ GSKScanFlowFilterStrongMonochrome SWIFT_COMPILE_NAME("strongMonochrome") = 7,
901
+ /// A strong grayscale filter, ideal for text documents
902
+ GSKScanFlowFilterStrongGrayscale SWIFT_COMPILE_NAME("strongGrayscale") = 8,
903
+ /// A strong color filter, ideal for text documents with some color
904
+ GSKScanFlowFilterStrongColor SWIFT_COMPILE_NAME("strongColor") = 9,
905
+ /// A filter that ensures best results for documents with a dark background
906
+ GSKScanFlowFilterDarkBackground SWIFT_COMPILE_NAME("darkBackground") = 10,
907
+ /// A filter designed to improve scans of photos.
908
+ GSKScanFlowFilterPhoto SWIFT_COMPILE_NAME("photo") = 11,
713
909
  };
714
910
 
715
911
  /// The capture screen flash mode.
@@ -11,32 +11,34 @@ FOUNDATION_EXPORT double GSSDKVersionNumber;
11
11
  //! Project version string for GSSDK.
12
12
  FOUNDATION_EXPORT const unsigned char GSSDKVersionString[];
13
13
 
14
- #import <GSSDK/GSKCore.h>
15
- #import <GSSDK/GSKDocumentDetector.h>
16
- #import <GSSDK/GSKScanProcessor.h>
17
- #import <GSSDK/GSKError.h>
18
- #import <GSSDK/UIImage+GSKUtils.h>
19
- #import <GSSDK/GSKLog.h>
20
- #import <GSSDK/GSKLoggerSeverity.h>
21
- #import <GSSDK/GSKDefaultLogger.h>
22
- #import <GSSDK/GSKLicenseKeyChecker.h>
23
-
24
- // UI
14
+ #import <GSSDK/GSKBackgroundKind.h>
25
15
  #import <GSSDK/GSKCameraSession.h>
26
16
  #import <GSSDK/GSKCameraViewController.h>
17
+ #import <GSSDK/GSKCore.h>
18
+ #import <GSSDK/GSKDefaultLogger.h>
19
+ #import <GSSDK/GSKDocumentComposition.h>
20
+ #import <GSSDK/GSKDocumentDetector.h>
27
21
  #import <GSSDK/GSKEditableFrame.h>
28
22
  #import <GSSDK/GSKEditFrameView.h>
29
23
  #import <GSSDK/GSKEditFrameViewController.h>
30
- #import <GSSDK/GSKShutterView.h>
31
- #import <GSSDK/GSKView.h>
24
+ #import <GSSDK/GSKError.h>
25
+ #import <GSSDK/GSKFilterColorPalette.h>
26
+ #import <GSSDK/GSKFilterStyle.h>
27
+ #import <GSSDK/GSKLicenseKeyChecker.h>
28
+ #import <GSSDK/GSKLog.h>
29
+ #import <GSSDK/GSKLoggerSeverity.h>
30
+ #import <GSSDK/GSKMagnifierView.h>
32
31
  #import <GSSDK/GSKQuadrangle.h>
33
32
  #import <GSSDK/GSKScan.h>
34
- #import <GSSDK/GSKTriggerDecider.h>
35
- #import <GSSDK/GSKMagnifierView.h>
36
- #import <GSSDK/MBProgressHUD.h>
37
-
38
- // ScanFlow
33
+ #import <GSSDK/GSKScanFlowErrorDomain.h>
34
+ #import <GSSDK/GSKScanFlowErrorDomain.h>
35
+ #import <GSSDK/GSKScanFlowOCROutputFormats.h>
36
+ #import <GSSDK/GSKScanFlowOCROutputFormats.h>
39
37
  #import <GSSDK/GSKScanFlowPostProcessingActions.h>
40
38
  #import <GSSDK/GSKScanFlowStructuredData.h>
41
- #import <GSSDK/GSKScanFlowOCROutputFormats.h>
42
- #import <GSSDK/GSKScanFlowErrorDomain.h>
39
+ #import <GSSDK/GSKScanProcessor.h>
40
+ #import <GSSDK/GSKShutterView.h>
41
+ #import <GSSDK/GSKTriggerDecider.h>
42
+ #import <GSSDK/GSKView.h>
43
+ #import <GSSDK/MBProgressHUD.h>
44
+ #import <GSSDK/UIImage+GSKUtils.h>