fromBytes static method

ArcGISImage fromBytes(
  1. Uint8List bytes
)

Creates an ArcGISImage parsed from a raw data buffer in JPG or PNG format.

Implementation

static ArcGISImage fromBytes(Uint8List bytes) {
  _initializeArcGISEnvironmentIfNeeded();
  final byteArray = ByteArrayBuffer(bytes);
  final handle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_Image_createWithBuffer(byteArray.ref, errorHandler);
  });
  return ArcGISImage._withHandle(handle);
}