libdart_openmvg/lib/archimedes_c_shim.dart

15 lines
538 B
Dart
Raw Normal View History

2024-03-11 18:42:48 +01:00
import 'dart:ffi';
import 'package:archimedes_mobile_lib/dynloader.dart';
import 'archimedes_mobile_lib_bindings_generated.dart';
final _dylib = getArchimedesCLib();
final ArchimedesMobileLibBindings _bindings =
ArchimedesMobileLibBindings(_dylib);
int getImageData(Pointer<Frame> frame, Pointer<UnsignedChar> data) =>
_bindings.archimedes_get_image_data(frame, data);
Pointer<Frame> newFrame(
Pointer<Uint8> data, int dataLen, int w, int h, int depth) =>
_bindings.new_frame_from_data(data, dataLen, w, h, depth);