info static method

(int, int, int, int) info(
  1. String path
)

Implementation

static (int result, int channels, int width, int height) info(String path) {
  final pPath = path.toNativeUtf8().cast<ffi.Char>();
  final pW = calloc<ffi.Int>();
  final pH = calloc<ffi.Int>();
  final pChannels = calloc<ffi.Int>();
  final result = c.stbi_info(pPath, pW, pH, pChannels);
  final rval = (result, pChannels.value, pW.value, pH.value);
  calloc.free(pPath);
  calloc.free(pW);
  calloc.free(pH);
  calloc.free(pChannels);
  return rval;
}