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
From the Javadocs for ImageIO.read()
Returns a
BufferedImage
as the result of decoding a supplied File with anImageReader
chosen automatically from among those currently registered. TheFile
is wrapped in anImageInputStream
. If no registeredImageReader
claims to be able to read the resulting stream,null
is returned.
Try creating an ImageInputStream
, then pass that onto the ImageIO.read() method, instead of sending the file itself.