decode static method
Future<List<UCode> >
decode(
- Uint8List gray,
- int width,
- int height,
- int rowStride,
- UCodeScanOptions options,
Decodes a grayscale buffer in the worker isolate.
Implementation
static Future<List<UCode>> decode(Uint8List gray, int width, int height, int rowStride, UCodeScanOptions options) async {
await _ensureStarted();
final SendPort? port = _port;
if (port == null) return const <UCode>[];
final int job = _nextJob++;
final Completer<List<UCode>> completer = Completer<List<UCode>>();
_pending[job] = completer;
port.send(<String, Object?>{
"job": job,
"gray": gray,
"width": width,
"height": height,
"rowStride": rowStride,
"options": options.toMap(),
});
return completer.future;
}