I need to read an image, resize it and then save it.
However, when reading a very large image, ImageIO#read()
returns null.
FileInputStream f = new FileInputStream(imagePath);
image = ImageIO.read(f);
How is this caused and how can I solve it?