PhotoEditModel

@available(iOS 9.0, *)
public struct PhotoEditModel : Equatable
extension PhotoEditModel: ObjectiveCBridgeable

A PhotoEditModel holds information about any modification that should be applied to an image.

  • Information about the adjustments that should be applied to an image.

    Declaration

    Swift

    public var adjustmentModel: AdjustmentModel
  • Information about the effect that should be applied to an image.

    Declaration

    Swift

    public var effectFilterModel: EffectFilterModel
  • Information about the focus that should be applied to an image.

    Declaration

    Swift

    public var focusModel: FocusModel
  • Information about the overlay that should be applied to an image.

    Declaration

    Swift

    public var overlayModel: OverlayModel
  • Information about the sprites that should be added to an image.

    Declaration

    Swift

    public var spriteModels: [SpriteModel]
  • Information about the transform that should be applied to an image.

    Declaration

    Swift

    public var transformModel: TransformModel
  • Information about the trim that should be applied to a video.

    Declaration

    Swift

    public var trimModel: TrimModel
  • Whether auto enhancement is enabled for an image.

    Declaration

    Swift

    public var isAutoEnhancementEnabled: Bool

Initializers

  • Deserializes a PhotoEditModel using the given data. If the serialized data does not contain an image object, a reference size must be provided. If there are serialized input dimensions but a reference size is passed regardless, the reference size takes precedence over the deserialized size.

    Declaration

    Swift

    public init?(serializedData data: Data, referenceSize: CGSize?, assetCatalog: AssetCatalog)

    Parameters

    data

    The data to deserialize.

    referenceSize

    A size that the deserialized data should refer to when denormalizing normalized values.

    assetCatalog

    If the deserialized data contains embedded personal assets they will be added to this AssetCatalog.

  • Deserializes a PhotoEditModel using the given data. If the serialized data does not contain an image object, a reference size must be provided. If there are serialized input dimensions but a reference size is passed regardless, the reference size takes precedence over the deserialized size. If the deserialized data contains embedded personal assets they will be added to AssetCatalog.shared.

    Declaration

    Swift

    public init?(serializedData data: Data, referenceSize: CGSize?)

    Parameters

    data

    The data to deserialize.

    referenceSize

    A size that the deserialized data should refer to when denormalizing normalized values.

  • Deserializes a PhotoEditModel using the given data. If the serialized data does not contain an image object, a reference size larger than CGSize.zero must be provided. If there are serialized input dimensions but a reference size larger than CGSize.zero is passed regardless, the reference size takes precedence over the deserialized size. If the deserialized data contains embedded personal assets they will be added to AssetCatalog.shared.

    Declaration

    Swift

    public init?(serializedData data: Data, referenceSize: CGSize)

    Parameters

    data

    The data to deserialize.

    referenceSize

    A size that the deserialized data should refer to when denormalizing normalized values or CGSize.zero.

Helpers

  • Searches for a SpriteModel with the given UUID.

    Declaration

    Swift

    public func spriteModel(with uuid: UUID) -> (Int, SpriteModel)?

    Parameters

    uuid

    The UUID of the sprite model to search for.

    Return Value

    A tuple with the index of the sprite model within the sprite model array and the sprite model if it is found, nil otherwise.