Load a PNG image into Java as BufferedImage through JNI C code
问题 I have the following problem. I have C code that acquires a PNG image as basically raw data and keeps it in memory. I would like this raw data to be translated to a BufferedImage in Java, through the use of JNI. Does anyone know any way of doing this or has done this before? 回答1: I'll assume you know the basics of how to call functions with JNI. It's not that complicated, although it can be a pain in the ass. If you want to get it done quickly, just write the PNG to a temp file, pass the file