Personal tools
  • We're Hiring!

You are here: Home Support FAQ Bio-Formats I see an 'OutOfMemory' or 'NegativeArraySize' error message when attempting to open an SVS or JPEG-2000 file. What does this mean?

I see an 'OutOfMemory' or 'NegativeArraySize' error message when attempting to open an SVS or JPEG-2000 file. What does this mean?

An 'OutOfMemory' error message indicates that the amount of pixel data in a single image plane exceeds the amount of memory allocated to the JVM.  A 'NegativeArraySize' error message indicates that the amount of pixel data in a single image plane exceeds 2 GB.

In the former case, increasing the amount of memory that is allocated to the JVM should solve the problem.  In the latter case, you will need to open the image in sections.  If you are using Bio-Formats as a library, this means using the 'openBytes(int, int, int, int, int)' method in loci.formats.IFormatReader; if you are using Bio-Formats within ImageJ, this means selecting the 'Crop on import' option.

Note that JPEG-2000 is a very efficient compression algorithm - thus the size of the file on disk will be substantially smaller than the amount of memory required to store the uncompressed pixel data.  It is not uncommon for a JPEG-2000 or SVS file to occupy less than 200 MB on disk, and yet have over 2 GB of uncompressed pixel data.

Document Actions