DocumentModel
A base class containing images for a scanned document
Last updated
A base class containing images for a scanned document
Last updated
Only relevant details are shown, boilerplate or standard Swift generated code is omitted
@objc public var portraitImage: UIImage? { get }
The cropped version of documentImage, containing just the face.
@objc public var documentImage: UIImage? { get }
Contains an original image of the document.
@objc public var croppedDocumentImage: UIImage? { get }
The cropped version of documentImage, containing just the document.
@objc public var portraitImagePath: String? { get }
The path to portraitImage, after it is saved. Otherwise nil.
@objc public var documentImagePath: String? { get }
The path to documentImage, after it is saved. Otherwise nil.
@objc public var croppedDocumentImagePath: String? { get }
The path to croppedDocumentImage, after it is saved. Otherwise nil.
@objc public func saveImages()
Saves the portraitImage, documentImage and croppedDocumentImage and populates their respective path variables.
public func encode(to encoder: Encoder) throws
Encodes the model using the encoder provided. Used to convert the model to JSON.
Name
Type
Description
UIImage?
The cropped version of documentImage, containing just the face.
UIImage?
Contains an original image of the document.
UIImage?
The cropped version of documentImage, containing just the document.
String?
The path to portraitImage, after it is saved. Otherwise nil.
String?
The path to documentImage, after it is saved. Otherwise nil.
String?
The path to croppedDocumentImage, after it is saved. Otherwise nil.
Signature
Return Type
Description
Void
Saves the portraitImage, documentImage and croppedDocumentImage and populates their respective path variables.
Void
Encodes the model using the encoder provided. Used to convert the model to JSON.