tags:

views:

155

answers:

1

Just to follow up on here: http://stackoverflow.com/questions/961795/creating-very-large-image-files-with-bufferedimage-strange-issues-depending-on-c

I still have the issue and I did try the Xmx command line to make sure the JVM had at least 1024m of RAM, I put the parametere in as both -Xmx1024m and -Xmx 1024m but neither worked.

+1  A: 

The syntax is -Xmx1024m. Other then that, you didn't answer my question on the previous thread - you said you were showing the image (after creating it). When exactly do you get the exception? After showing it or after creating it? Do you re-create the image every time you want to display it? We need more information - post the code you're using to load and show the image, preferably an SSCCE.

laginimaineb
oh sorry I thought I mentioned after creating it, that was where I traced the error back to.I get it the first time I create it, BufferedImage bi = new BufferedImage(58240, 1664, BufferedImage.TYPE_INT_RGB);
meds
Creating the image this way means it will take about ~390MB. This is still less then the 1024MB you gave the heap which means that either you have 2+ more images like this or something else is taking up the heap space. Other than that, you still haven't mentioned have you display it. It would also help if you gave us the output of java -version.
laginimaineb
+1 for the SSCCE reference. That's my new watchword as of today
Brian Agnew