Skip to main content

Supported Formats

Input Formats

SashaSDK accepts image input through CIImage, which generally supports:

  • JPEG (.jpg, .jpeg)
  • PNG (.png)
  • HEIF/HEIC (.heic, .heif)
  • TIFF (.tiff, .tif)
  • BMP (.bmp)

There are a lot of convenience ways of getting a CIImage representation of your usual data types:

  • CIImage.init?(image: UIImage) - for common assets representation;
  • CIImage.init?(contentsOf: URL) - for locally stored images;
  • CIImage.init(cgImage: CGImage) - for more advanced usage of image manipulation;
  • CIImage.init?(data: Data)- for those advanced cases where your image has raw data rerepresentation;

Image Specifications

PropertyRequirement
Maximum Width2000px (auto-scaled if bigger)
Minimum Size500x500px

Output Format

The SDK returns the output SashaSDK.Signing.Output object for processed image.

extension SashaSDK.Signing {
struct Output: Sendable {
/// Global unique identifier of the embedded `SASHA` data.
public let signatureId: SignatureID
/// Image representation containing the `SASHA` signature embedded.
public let processedImage: CIImage

/// - Parameters:
/// - signatureId: Global unique identifier of the embedded signature.
/// - processedImage: image with the signature embedded.
init(signatureId: SignatureID, processedImage: CIImage) {
self.signatureId = signatureId
self.processedImage = processedImage
}
}
}