addImageWatermark method

  1. @override
Future<String?> addImageWatermark(
  1. String filePath,
  2. String watermarkImagePath,
  3. int x,
  4. int y,
  5. int watermarkWidth,
  6. int watermarkHeight,
  7. int quality,
  8. ImageFormat imageFormat,
)
override

Adds an image watermark to the image at the specified location with the given parameters. Use just for IOS or Android. For WEB version you should use addImageWatermarkUint8List()

Returns a String representing the path to the watermarked image.

Implementation

@override
Future<String?> addImageWatermark(
  String filePath,
  String watermarkImagePath,
  int x,
  int y,
  int watermarkWidth,
  int watermarkHeight,
  int quality,
  ImageFormat imageFormat,
) async {
  final result = await watermarkImageChannel.invokeMethod<String?>(
    'addImageWatermark',
    {
      'filePath': filePath,
      'watermarkImagePath': watermarkImagePath,
      'x': x,
      'y': y,
      'watermarkWidth': watermarkWidth,
      'watermarkHeight': watermarkHeight,
      'quality': quality,
      'imageFormat': imageFormat.name,
    },
  );
  return result;
}