Skip to main content
PESDK/iOS/Concepts

Watermark

PhotoEditor SDK for iOS can easily be tailored to meet your business needs. Learn how to swiftly create the editor your use-case requires.

Watermark

You can configure a watermark image with its relative size and alignment, which is added permanently to the preview and the export.

If adding the watermark is the only editing operation to be performed, forceExport must be enabled to have the watermark applied to the export.

All of the watermark configuration options are accessible using the global Configuration builder:

let configuration = Configuration { builder in
builder.configurePhotoEditViewController { options in
options.forceExport = true
}
builder.configureWatermark { options in
options.imageURL = Bundle.main.url(forResource: "watermark", withExtension: "png")
options.alignment = .bottomLeft
options.size = 0.2
options.inset = 0.05
}
}
let sampleImage = UIImage(named: "sample_image")!
let photo = Photo(image: sampleImage)
let photoEditViewController = PhotoEditViewController(photoAsset: photo, configuration: configuration)

WARNING: The watermark itself is not processed, so to achieve the effect of transparency, make sure that your input image supports that (use a PNG file with alpha channel).