/** Array version of: {@link #stbi_info info} */ @NativeType("int") public static boolean stbi_info(@NativeType("char const *") ByteBuffer filename, @NativeType("int *") int[] x, @NativeType("int *") int[] y, @NativeType("int *") int[] comp) { if (CHECKS) { checkNT1(filename); check(x, 1); check(y, 1); check(comp, 1); } return nstbi_info(memAddress(filename), x, y, comp) != 0; }
/** Array version of: {@link #stbi_info info} */ @NativeType("int") public static boolean stbi_info(@NativeType("char const *") CharSequence filename, @NativeType("int *") int[] x, @NativeType("int *") int[] y, @NativeType("int *") int[] comp) { if (CHECKS) { check(x, 1); check(y, 1); check(comp, 1); } MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { stack.nASCII(filename, true); long filenameEncoded = stack.getPointerAddress(); return nstbi_info(filenameEncoded, x, y, comp) != 0; } finally { stack.setPointer(stackPointer); } }
/** * Returns image dimensions & components without fully decoding the image. * * @param filename the file name * @param x outputs the image width in pixels * @param y outputs the image height in pixels * @param comp outputs number of components in image * * @return 1 on success, 0 on failure */ @NativeType("int") public static boolean stbi_info(@NativeType("char const *") ByteBuffer filename, @NativeType("int *") IntBuffer x, @NativeType("int *") IntBuffer y, @NativeType("int *") IntBuffer comp) { if (CHECKS) { checkNT1(filename); check(x, 1); check(y, 1); check(comp, 1); } return nstbi_info(memAddress(filename), memAddress(x), memAddress(y), memAddress(comp)) != 0; }
/** * Returns image dimensions & components without fully decoding the image. * * @param filename the file name * @param x outputs the image width in pixels * @param y outputs the image height in pixels * @param comp outputs number of components in image * * @return 1 on success, 0 on failure */ @NativeType("int") public static boolean stbi_info(@NativeType("char const *") CharSequence filename, @NativeType("int *") IntBuffer x, @NativeType("int *") IntBuffer y, @NativeType("int *") IntBuffer comp) { if (CHECKS) { check(x, 1); check(y, 1); check(comp, 1); } MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { stack.nASCII(filename, true); long filenameEncoded = stack.getPointerAddress(); return nstbi_info(filenameEncoded, memAddress(x), memAddress(y), memAddress(comp)) != 0; } finally { stack.setPointer(stackPointer); } }