Posted by
Saalfeld, Stephan on
Jun 05, 2014; 2:14pm
URL: http://imagej.273.s1.nabble.com/Which-is-the-limit-of-the-number-of-pixels-in-an-RGB-Image-tp5008024p5008034.html
Hi,
reading the exception, I see that the error is triggered here:
http://developer.classpath.org/doc/java/awt/image/ComponentSampleModel-source.htmlwhich tries to create a DataBufferByte with negative (> 2G) size. We
see that the JPEG200 RGB image is read into DataBufferByte instead of
DataBufferInt which results in a pixelStride of 3 or 4 depending on
whether there is alpha included. This triggers the problem.
The method that is doing this, is
com.sun.media.imageioimpl.plugins.jpeg2000.J2KReadState.readAsRaster
used by
at com.sun.media.imageioimpl.plugins.jpeg2000.J2KImageReader.readRaster
used by
loci.formats.services.JAIIIOServiceImpl.readRaster
Assuming LOCI to be more responsive and attentive than Oracle I suggest
that you send them a mail telling them that their library uses a library
for JPEG2000 that does bad things.
Not using JPEG2000 for images of this size would probably solve your
problem for the time remaining.
Best,
Stephan
On Thu, 2014-06-05 at 07:56 -0500, Curtis Rueden wrote:
> Hi Stamatis,
>
> > However, when I try to create a NEW RBG image with any dimensions over
> > 24000x24000 (which is only 0.6GPixel), Fiji v2.0 (but also v1.43 and
> > v1.48 - on a Mac) quit with no message.
>
> I was able to create a new 35000 x 35000 RGB image in a fully updated Fiji.
> It took maybe 30 seconds to create and paint it, but it didn't crash.
>
> Fiji crashing with no error sounds like a bug in Java, probably system
> specific.
>
> My system:
> OS X 10.9.3
> Java 1.6.0_65 64-bit
>
> I would suggest installing Java 7 and giving that a try, if you haven't
> already [1], since Java 7 seems to have fewer crash bugs than Java 6 does,
> in general.
>
> Regards,
> Curtis
>
> [1]
>
http://fiji.sc/Frequently_Asked_Questions#How_do_I_launch_Fiji_with_a_different_version_of_Java.3F>
>
> On Thu, Jun 5, 2014 at 4:28 AM, Stamatis Pagakis <
[hidden email]>
> wrote:
>
> > I am sorry, but my previous posting (with the same title) came (to me at
> > least) without the main body message, which went as follows:
> >
> >
> > Hello everyone
> >
> > If I remember correctly I've seen the message: "ImageJ can support images
> > up to 2GPixels in size", and when I tried it, it holds for an 8-bit image.
> >
> > However, when I try to create a NEW RBG image with any dimensions over
> > 24000x24000 (which is only 0.6GPixel), Fiji v2.0 (but also v1.43 and v1.48
> > - on a Mac) quit with no message.
> >
> > The reason I went into this is that I tried to open a jpg2000 RGB image
> > which is roughly 26000x35000 pixels but it failed (with the exception
> > message in the attached txt file).
> > By testing with different variables, I concluded that the problem was only
> > the size. A smaller image of the same format opened just fine.
> >
> > My installations had over 6GB RAM available to ImageJ, so it was not due
> > to application memory limit.
> >
> > Is there anything it can be done?
> >
> > thanks in advance
> >
> >
> > ******************************
> > Stamatis Pagakis Ph.D.
> > Head, Biological Imaging
> > Biomedical Research Foundation, Academy of Athens
> > Soranou Efessiou 4, Athens 115 27 - Greece
> > M: +306946644955
> > W: +302106597481
> > FAX: +302106597545
> >
http://www.bioacademy.gr/faculty-details/HM4/Stamatis> >
> >
> > --
> > ImageJ mailing list:
http://imagej.nih.gov/ij/list.html> >
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html--
Stephan Saalfeld, Ph.D.
Group Leader
Janelia Farm Research Campus
19700 Helix Drive | Ashburn, VA 20147
Phone: 571-209-4184 | Fax: 571-209-4946
[hidden email]
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html