Which is the limit of the number of pixels in an RGB Image?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Which is the limit of the number of pixels in an RGB Image?

S. Pagakis (IIBEAA)
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
Reply | Threaded
Open this post in threaded view
|

Re: Which is the limit of the number of pixels in an RGB Image?

ctrueden
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
Reply | Threaded
Open this post in threaded view
|

Re: Which is the limit of the number of pixels in an RGB Image?

S. Pagakis (IIBEAA)
Dear Curtis

I'll look into the Java7  issue.

However, my Fiji installation on my Mac is the same as yours  (1.49b, Java 1.6.0_65 64-bit) but I am on an older system (10.8.5)

It still quits trying to create a 35000x35000 RGB

Thanks

On 5 Jun, 2014, at 3:56 PM, Curtis Rueden <[hidden email]> 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

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Which is the limit of the number of pixels in an RGB Image?

Saalfeld, Stephan
In reply to this post by ctrueden
Hi,

reading the exception, I see that the error is triggered here:

http://developer.classpath.org/doc/java/awt/image/ComponentSampleModel-source.html

which 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
Reply | Threaded
Open this post in threaded view
|

Re: Which is the limit of the number of pixels in an RGB Image?

ctrueden
In reply to this post by S. Pagakis (IIBEAA)
Hi Stamatis,

> It still quits trying to create a 35000x35000 RGB

Regarding this errorless crash (not the JPEG2000 problem already analyzed
by Stephan), you could try launching Fiji from the console, and seeing if a
crash report gets printed there.

In Terminal:
/Applications/Fiji.app/Contents/MacOS/ImageJ-macosx

Then create the new image and see if anything is printed to the console.

And if you are feeling tech-savvy, see also:
http://fiji.sc/Debugging#Debugging_hard_JVM_crashes

> 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.

Best place to report that bug is:
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users/

Regards,
Curtis


On Thu, Jun 5, 2014 at 8:37 AM, Stamatis Pagakis <[hidden email]>
wrote:

> Dear Curtis
>
> I'll look into the Java7  issue.
>
> However, my Fiji installation on my Mac is the same as yours  (1.49b, Java
> 1.6.0_65 64-bit) but I am on an older system (10.8.5)
>
> It still quits trying to create a 35000x35000 RGB
>
> Thanks
>
> On 5 Jun, 2014, at 3:56 PM, Curtis Rueden <[hidden email]> 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
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Which is the limit of the number of pixels in an RGB Image?

S. Pagakis (IIBEAA)
Hi Curtis

This is what I get in the terminal after the errorless crash:

Invalid memory access of location 0x59a02b4c4 rip=0x118f4f28a
Segmentation fault: 11

and it makes any sense to you, here are the first lines from the "report to Apple"



Date/Time:       2014-06-05 17:46:40.566 +0300
OS Version:      Mac OS X 10.8.5 (12F45)
Report Version:  10

Interval Since Last Report:          3736020 sec
Crashes Since Last Report:           52
Per-App Crashes Since Last Report:   5
Anonymous UUID:                      72B00895-1B56-19D9-8F57-93A4E163E248

Crashed Thread:  24  Java: AWT-EventQueue-0

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x000000059a02b4c4

VM Regions Near 0x59a02b4c4:
    CG backing stores      00000001c8296000-00000001c856f000 [ 2916K] rw-/rw- SM=SHM  
-->
    Java                   0000000614800000-000000079c800000 [  6.1G] rw-/rwx SM=PRV  

Application Specific Information:
Java information:
 Exception type: Bus Error (0xa) at pc=118f4f28a
 
 Java VM: Java HotSpot(TM) 64-Bit Server VM (20.65-b04-462 mixed mode macosx-amd64)
 
Current thread (11d9ab000):  JavaThread "AWT-EventQueue-0" [_thread_in_native, id=596508672, stack(1237e0000,1238e0000)]
Stack: [1237e0000,1238e0000]
On 5 Jun, 2014, at 5:29 PM, Curtis Rueden <[hidden email]> wrote:



Stamatis



> Hi Stamatis,
>
>> It still quits trying to create a 35000x35000 RGB
>
> Regarding this errorless crash (not the JPEG2000 problem already analyzed
> by Stephan), you could try launching Fiji from the console, and seeing if a
> crash report gets printed there.
>
> In Terminal:
> /Applications/Fiji.app/Contents/MacOS/ImageJ-macosx
>
> Then create the new image and see if anything is printed to the console.
>
> And if you are feeling tech-savvy, see also:
> http://fiji.sc/Debugging#Debugging_hard_JVM_crashes
>
>> 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.
>
> Best place to report that bug is:
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users/
>
> Regards,
> Curtis
>
>
> On Thu, Jun 5, 2014 at 8:37 AM, Stamatis Pagakis <[hidden email]>
> wrote:
>
>> Dear Curtis
>>
>> I'll look into the Java7  issue.
>>
>> However, my Fiji installation on my Mac is the same as yours  (1.49b, Java
>> 1.6.0_65 64-bit) but I am on an older system (10.8.5)
>>
>> It still quits trying to create a 35000x35000 RGB
>>
>> Thanks
>>
>> On 5 Jun, 2014, at 3:56 PM, Curtis Rueden <[hidden email]> 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
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Which is the limit of the number of pixels in an RGB Image?

dscho
Hi Stamatis,

On Thu, 5 Jun 2014, Stamatis Pagakis wrote:

> This is what I get in the terminal after the errorless crash:
>
> Invalid memory access of location 0x59a02b4c4 rip=0x118f4f28a
> Segmentation fault: 11

That is a hard crash of the Java Virtual Machine, indicating a bug in Java
itself. In the version your Fiji is using, that is.

> OS Version:      Mac OS X 10.8.5 (12F45)

This MacOSX version actually can run newer Java versions (Apple made sure
that Mac OSX 10.6 cannot). So you should be able to follow the
instructions in the link Curtis posted earlier in this thread to try again
with Java 7. In my experience, Java 7 has not been quite as stable on
MacOSX as I would like to, but the latest versions did stabilize quite a
bit.

Ciao,
Johannes

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Which is the limit of the number of pixels in an RGB Image?

dscho
Hi Stamatis,

I believe that my time is better spent giving this answer publicly, as it
is most likely to interest of many more persons than just one.

On Fri, 6 Jun 2014, Stamatis Pagakis wrote:

> I am a bit confused about switching to java 7 ( I also need to do it on
> a number of win7 machines, besides my Mac)

As Curtis pointed out, we have documentation for that on the Wiki. Let me
find it again... *paper-shuffling sounds* ah, there it is:

        http://fiji.sc/Frequently_Asked_Questions#How_do_I_launch_Fiji_with_a_different_version_of_Java.3F

> if I throw away my current fiji installations and download a fresh pack
> from http://fiji.sc/Downloads
>
> will it do the trick?

First of all, you will never have to throw away Fiji installations. You
can unpack a new Fiji into a new location. In the near future, we plan to
have a function that allows you to "repair" installations so that you can
fix whatever needs to be fixed in existing installations given a new,
working installation.

> Or do I have to go to
>
> http://www.java.com/en/download/mac_download.jsp?locale=en
>
> and download from there?

If you want to use Java 7, then yes, you will have to download Java 7 from
the Oracle web site.

Ciao,
Johannes

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html