Problem using ImageIO.read

后端 未结 3 1351
滥情空心
滥情空心 2021-02-13 19:45

Ok I have an Image that I\'m trying to read. Problem is that the Image.read(file) returns NULL.

File file = new File(\"C:\\\\images\\\\image1.jpg\");
if(file.exi         


        
3条回答
  •  南方客
    南方客 (楼主)
    2021-02-13 19:57

    Ok since I switched laptops, I looked at my old laptop and found this JAR jai-imageio.jar in the jre/ext/lib (I know bad idea). I moved it to my project/lib and it worked! I guess this jai-imageio.jar contains additional image readers.

提交回复
热议问题