WatermarkOptions

@objcMembers
@objc(PESDKWatermarkOptions)
open class WatermarkOptions : NSObject

Options for configuring custom watermark.

  • Input image URL for the watermark. No additional processing is performed on the image. Transparency must be supported by the file itself. If nil no watermark will be applied. If the watermark is the only editing operation to be performed, PhotoEditViewControllerOptions.forceExport or VideoEditViewControllerOptions.forceExport must be enabled for the change to be applied.

    Declaration

    Swift

    public let imageURL: URL?
  • The relative size of the watermark. This value is measured in relation to the smaller side of the transformed image/video that the user is editing. The default value is 0.2.

    Note

    Values outside (0.0, 1.0) will be clamped.

    Declaration

    Swift

    public let size: CGFloat
  • The relative spacing between the edges of the image/video and the watermark. This value is measured in relation to the smaller side of the transformed image/video that the user is editing. The default value is 0.05.

    Note

    Values outside (0.0, 0.5) will be clamped.

    Declaration

    Swift

    public let inset: CGFloat
  • It defines the layout of the watermark inside the canvas. The default value is .topRight.

    Note

    .center, .topLeft, .topRight, .bottomLeft, .bottomRight are currently supported.

    Declaration

    Swift

    public let alignment: UIView.ContentMode
  • Creates a new instance of WatermarkOptions using the given builder.

    Declaration

    Swift

    public init(builder: WatermarkOptionsBuilder)

    Parameters

    builder