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.
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 inbuilder.configurePhotoEditViewController { options inoptions.forceExport = true}builder.configureWatermark { options inoptions.imageURL = Bundle.main.url(forResource: "watermark", withExtension: "png")options.alignment = .bottomLeftoptions.size = 0.2options.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).