clone method

Image clone()

Implementation

Image clone() {
  final pBytes = malloc<ffi.Uint8>(bytes.length);
  pBytes.asTypedList(bytes.length).setAll(0, bytes);
  return Image.fromPointer(
    pBytes.cast(),
    width: _width,
    height: _height,
    channels: _channels,
    desiredChannels: _desiredChannels,
    dtype: dtype,
  );
}