check(channels_in_file, 1); long __result = nstbi_load(memAddress(filename), memAddress(x), memAddress(y), memAddress(channels_in_file), desired_channels); return memByteBufferSafe(__result, x.get(x.position()) * y.get(y.position()) * (desired_channels != 0 ? desired_channels : channels_in_file.get(channels_in_file.position())));
/** Array version of: {@link #stbi_load load} */ @Nullable @NativeType("stbi_uc *") public static ByteBuffer stbi_load(@NativeType("char const *") ByteBuffer filename, @NativeType("int *") int[] x, @NativeType("int *") int[] y, @NativeType("int *") int[] channels_in_file, int desired_channels) { if (CHECKS) { checkNT1(filename); check(x, 1); check(y, 1); check(channels_in_file, 1); } long __result = nstbi_load(memAddress(filename), x, y, channels_in_file, desired_channels); return memByteBufferSafe(__result, x[0] * y[0] * (desired_channels != 0 ? desired_channels : channels_in_file[0])); }
stack.nASCII(filename, true); long filenameEncoded = stack.getPointerAddress(); long __result = nstbi_load(filenameEncoded, memAddress(x), memAddress(y), memAddress(channels_in_file), desired_channels); return memByteBufferSafe(__result, x.get(x.position()) * y.get(y.position()) * (desired_channels != 0 ? desired_channels : channels_in_file.get(channels_in_file.position()))); } finally {
/** Array version of: {@link #stbi_load load} */ @Nullable @NativeType("stbi_uc *") public static ByteBuffer stbi_load(@NativeType("char const *") CharSequence filename, @NativeType("int *") int[] x, @NativeType("int *") int[] y, @NativeType("int *") int[] channels_in_file, int desired_channels) { if (CHECKS) { check(x, 1); check(y, 1); check(channels_in_file, 1); } MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { stack.nASCII(filename, true); long filenameEncoded = stack.getPointerAddress(); long __result = nstbi_load(filenameEncoded, x, y, channels_in_file, desired_channels); return memByteBufferSafe(__result, x[0] * y[0] * (desired_channels != 0 ? desired_channels : channels_in_file[0])); } finally { stack.setPointer(stackPointer); } }