getEncodedBuffer method

Uint8List getEncodedBuffer()

Returns image data in the same format that it was created.

The byte array that is returned cannot be used after the ArcGISImage has been destroyed. The memory is deleted.

Return Value: The image data.

Implementation

Uint8List getEncodedBuffer() {
  final byteArrayHandle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_Image_getEncodedBuffer(_handle, errorHandler);
  });
  return _ByteArray._fromHandle(byteArrayHandle)!.toDartList();
}