decodeSingleFrameImage function

Future decodeSingleFrameImage(
  1. Uint8List data
)

Implementation

Future<Frame> decodeSingleFrameImage(Uint8List data) async {
  final JSObject decoded = await _decodeSingleFrameImage(data.toJS).toDart;

  return Frame(
    data: (decoded.getProperty('data'.toJS) as JSUint8Array).toDart,
    duration: (decoded.getProperty('duration'.toJS) as JSNumber).toDartDouble,
    width: (decoded.getProperty('width'.toJS) as JSNumber).toDartInt,
    height: (decoded.getProperty('height'.toJS) as JSNumber).toDartInt,
  );
}