-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Large JP2 Read Error #4244
Comments
I’m fairly new to Bioformats and was interested in this issue. I did some research and found the following that may be related. I found this Bioformats link regarding NegativeArraySize error: Reporting a bug — Bio-Formats 7.2.0 documentation Here is a screenshot: Mentions 2Gb of data being some sort of maximum….. A lot of info, I need to keep researching/learning.😎 Also, you mentioned you used ImageReader. What exactly is that? BioFormats?, ImageJ?,Fiji?, etc? |
Here's some example code: `
` I just tried this again (on a 47420 x 47420 jp2), and got a slightly different error: java.lang.IllegalArgumentException: Dimensions (width=47420 height=47420) are too large |
Same error with the recommended IFormatReader openBytes method. Somehow the TIFF reader is able to internally handle these large images (I don't think they are tiled, but don't really know how to check), but the JPEG2000 reader can't. |
Sounds good. I just completed getting bio-formats built in Eclipse. I think I need to read this link some to come up more to speed on using the API. 😎 https://bio-formats.readthedocs.io/en/v7.2.0/developers/java-library.html I had run bftools/showinf (https://docs.openmicroscopy.org/bio-formats/5.7.1/users/comlinetools/index.html) on a 66k x 66k grayscale jp2 image and got this at the end of the output: c:\steve\Bioformats\bftools> showinf c:\steve\temp\temp20\IMG_0067-66x66-grayscale.jp2 Reading series #0 pixel data (0-0) Another reference to 2G I hope to run some tests in Eclipse later today..... |
I've converted some large TIFFs to lossless JP2 (using gdal_translate), the TIFFs could be read with ImageReader, but the converted JP2s (same pixel dimension, 66680x66680) cannot. I'm using opi.formats-gpl 7.3.1.
java.lang.NegativeArraySizeException
at ome.codecs.JPEG2000Codec.decompress(JPEG2000Codec.java:261)
at loci.formats.codec.WrappedCodec.decompress(WrappedCodec.java:132)
at loci.formats.codec.JPEG2000Codec.decompress(JPEG2000Codec.java:63)
at loci.formats.in.JPEG2000Reader.openBytes(JPEG2000Reader.java:182)
at loci.formats.FormatReader.openBytes(FormatReader.java:922)
at loci.formats.ImageReader.openBytes(ImageReader.java:450)
at loci.formats.ReaderWrapper.openBytes(ReaderWrapper.java:336)
at loci.formats.gui.BufferedImageReader.openImage(BufferedImageReader.java:86)
The text was updated successfully, but these errors were encountered: