PhotoEditModel

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

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
  • 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?)

    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.

    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.

  • 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.