Skip to main content
PESDK/Flutter/Guides/User Interface

Watermark

Learn how to easily configure watermarks for PhotoEditor SDK for Flutter.

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, configuration.export.forceExport must be enabled to have the watermark applied to the export.

All of the watermark configuration options are accessible using the configuration.watermark option:

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

// Create [WatermarkOptions] to configure the watermark.
final watermarkOptions = WatermarkOptions("assets/watermark.png",
alignment: AlignmentMode.bottomLeft, size: 0.2, inset: 0.05);
// Enable force export so that the watermark is always
// applied.
final exportOptions = ExportOptions(forceExport: true);
// Create a [Configuration] instance.
final configuration =
Configuration(watermark: watermarkOptions, export: exportOptions);