![]() Throw new Exception("Failed to load image: " + fileName) Image = stbi_load_from_memory(imageBuffer, w, h, comp, 0) ![]() image is set to null and the Exception is thrown This is where everything fails if its in a jar, imageBuffer is the right size and has the right contents The image data gets put into the byte array no matter ifīyte imageData = new byte īufferUtils.createByteBuffer(imageData.length) IntBuffer h, IntBuffer comp) throws Exception The code: public static ByteBuffer loadImage(String fileName, IntBuffer w, ![]() ![]() I am following along with a tutorial book on LWJG元 and I tried to make my own image loading code (The book code does not use the STB library) and it works perfectly fine when the project is run normally (IntelliJ IDE, run directly from the build folder), It loads the image from into the ByteBuffer and stbi_load_from_memory works fine, but as soon as it is compiled and put in a jar file it just stops working, Even tho the image was successfully loaded into the ByteBuffer, as if the stbi_load_from_memory function just returns null if it's in a Jar. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |