I'm using following code to read image file of size 330MB
BufferedImage img=ImageIO.read("test.png");
How to resolve this?
I'm using following code to read image file of size 330MB
BufferedImage img=ImageIO.read("test.png");
How to resolve this?
You need to increase the value of heap using the -Xmx. From Javadoc
Specifies the maximum size, in bytes, of the memory allocation pool. This value must a multiple of 1024 greater than 2 MB. Append the letter k or K to indicate kilobytes, or m or M to indicate megabytes. The default value is chosen at runtime based on system configuration.