/** * Checks if the specified file contains an HDR image. * * @param filename the file name * * @return 1 if the image is HDR, 0 otherwise */ @NativeType("int") public static boolean stbi_is_hdr(@NativeType("char const *") ByteBuffer filename) { if (CHECKS) { checkNT1(filename); } return nstbi_is_hdr(memAddress(filename)) != 0; }
/** * Checks if the specified file contains an HDR image. * * @param filename the file name * * @return 1 if the image is HDR, 0 otherwise */ @NativeType("int") public static boolean stbi_is_hdr(@NativeType("char const *") CharSequence filename) { MemoryStack stack = stackGet(); int stackPointer = stack.getPointer(); try { stack.nASCII(filename, true); long filenameEncoded = stack.getPointerAddress(); return nstbi_is_hdr(filenameEncoded) != 0; } finally { stack.setPointer(stackPointer); } }