setImage method

void setImage({
  1. required Uint8List imageData,
  2. ImageFileFormat format = ImageFileFormat.png,
})

Sets the primary image for this landmark from raw image data.

Parameters

  • imageData: The image data as Uint8List.
  • format: The image file format (defaults to PNG).

See also:

  • img for a higher-level image wrapper.

Implementation

void setImage({
  required final Uint8List imageData,
  final ImageFileFormat format = ImageFileFormat.png,
}) {
  final dynamic gemImage = GemKitPlatform.instance.createGemImage(
    imageData,
    format.id,
  );
  try {
    objectMethod(pointerId, 'Landmark', 'setImage', args: gemImage);
  } finally {
    GemKitPlatform.instance.deleteCPointer(gemImage);
  }
}