composeImage method

Future<Uint8List> composeImage({
  1. required Uint8List inputImage,
  2. required Uint8List watermarkImage,
  3. String anchor = 'bottomRight',
  4. double margin = 16.0,
  5. double widthPercent = 0.18,
  6. double opacity = 0.6,
  7. String format = 'jpeg',
  8. double quality = 0.9,
  9. double offsetX = 0.0,
  10. double offsetY = 0.0,
  11. String marginUnit = 'px',
  12. String offsetUnit = 'px',
})

Composes inputImage with watermarkImage and returns encoded bytes.

Options (all optional with defaults):

  • anchor: one of 'topLeft','topRight','bottomLeft','bottomRight','center' (default: 'bottomRight')
  • margin: logical pixels in output space (default: 16.0)
  • widthPercent: 0..1 relative to base width (default: 0.18)
  • opacity: 0..1 applied to watermark (default: 0.6)
  • format: 'jpeg' | 'png' (default: 'jpeg')
  • quality: 0..1 for JPEG (default: 0.9)
  • offsetX/offsetY: offsets from the anchor (default: 0)
  • marginUnit: 'px' | 'percent' (default: 'px')
  • offsetUnit: 'px' | 'percent' (default: 'px')

Implementation

Future<Uint8List> composeImage({
  required Uint8List inputImage,
  required Uint8List watermarkImage,
  String anchor = 'bottomRight',
  double margin = 16.0,
  double widthPercent = 0.18,
  double opacity = 0.6,
  String format = 'jpeg',
  double quality = 0.9,
  double offsetX = 0.0,
  double offsetY = 0.0,
  String marginUnit = 'px',
  String offsetUnit = 'px',
}) {
  throw UnimplementedError('composeImage() has not been implemented.');
}