Skip to main content

RE: [JAI-IMAGEIO] TIFF reader exception: width*height > Integer.MAX_VALUE, bug or feature?

2 replies [Last post]
Anonymous

Hi Mike,

>>> mike.nidel@lmco.com 12.12.2007 20:28:23 >>>
>>>but what is the actual reading method you're using on the
ImageReader?

sourceImage = reader.readAsRenderedImage(0, null);

>>>Haven't we been over this exact thing, or am I just experiencing
deja
>>>vu?
Oh yes, but this question was not answered, feature or bug and if bug,
is it me or imageio?

br Kusti

> -----Original Message-----
> From: jai-imageio@javadesktop.org
> [mailto:jai-imageio@javadesktop.org]
> Sent: Wednesday, December 12, 2007 2:41 AM
> To: interest@jai-imageio.dev.java.net
> Subject: [JAI-IMAGEIO] TIFF reader exception: width*height >
> Integer.MAX_VALUE, bug or feature?
>
> Hi,
>
> I'm getting:
>
> java.lang.IllegalArgumentException: width*height >
Integer.MAX_VALUE!
>
> when I try to read a 80000x40000 TIFF image with an
> ImageReader returned
> by:
>
> ImageWriter writer =
> ImageIO.getImageWritersByFormatName("tiff").next();
> ImageReader reader = ImageIO.getImageReader(writer);
>
> Is this a bug or feature?
>
> Will this be changed to support larger files in the future?
>
> The codec returned by:
>
> ImageDecoder sourceDecoder =
> ImageCodec.createImageDecoder("tiff", sourceStream, null);
>
> Is able to read these large images, but seems to be much slower.
>
> Yes, the image I'm experimenting with is tiled and JPEG
> compressed and less than 500 MB (
>
> br Kusti
> [Message sent by forum member 'nyholku' (nyholku)]
>
> http://forums.java.net/jive/thread.jspa?messageID=249674
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@jai-imageio.dev.java.net

> For additional commands, e-mail:
> interest-help@jai-imageio.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai-imageio.dev.java.net
For additional commands, e-mail: interest-help@jai-imageio.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai-imageio.dev.java.net
For additional commands, e-mail: interest-help@jai-imageio.dev.java.net

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Nidel, Mike

ok, refresh my memory again: what's the exact spot where you get the
exception from? it's not after readAsRenderedImage() right?

> -----Original Message-----
> From: Kustaa Nyholm [mailto:Kustaa.Nyholm@planmeca.com]
> Sent: Wednesday, December 12, 2007 1:55 PM
> To: interest@jai-imageio.dev.java.net
> Subject: RE: [JAI-IMAGEIO] TIFF reader exception:
> width*height > Integer.MAX_VALUE, bug or feature?
>
> Hi Mike,
>
> >>> mike.nidel@lmco.com 12.12.2007 20:28:23 >>> but what is
> the actual
> >>>reading method you're using on the
> ImageReader?
>
> sourceImage = reader.readAsRenderedImage(0, null);
>
> >>>Haven't we been over this exact thing, or am I just experiencing
> deja
> >>>vu?
> Oh yes, but this question was not answered, feature or bug
> and if bug, is it me or imageio?
>
> br Kusti
>
>
>
> > -----Original Message-----
> > From: jai-imageio@javadesktop.org
> > [mailto:jai-imageio@javadesktop.org]
> > Sent: Wednesday, December 12, 2007 2:41 AM
> > To: interest@jai-imageio.dev.java.net
> > Subject: [JAI-IMAGEIO] TIFF reader exception: width*height >
> > Integer.MAX_VALUE, bug or feature?
> >
> > Hi,
> >
> > I'm getting:
> >
> > java.lang.IllegalArgumentException: width*height >
> Integer.MAX_VALUE!
> >
> > when I try to read a 80000x40000 TIFF image with an ImageReader
> > returned
> > by:
> >
> > ImageWriter writer =
> > ImageIO.getImageWritersByFormatName("tiff").next();
> > ImageReader reader = ImageIO.getImageReader(writer);
> >
> > Is this a bug or feature?
> >
> > Will this be changed to support larger files in the future?
> >
> > The codec returned by:
> >
> > ImageDecoder sourceDecoder =
> > ImageCodec.createImageDecoder("tiff", sourceStream, null);
> >
> > Is able to read these large images, but seems to be much slower.
> >
> > Yes, the image I'm experimenting with is tiled and JPEG
> compressed and
> > less than 500 MB ( > >
> >
> > br Kusti
> > [Message sent by forum member 'nyholku' (nyholku)]
> >
> > http://forums.java.net/jive/thread.jspa?messageID=249674
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> interest-unsubscribe@jai-imageio.dev.java.net
>
> > For additional commands, e-mail:
> > interest-help@jai-imageio.dev.java.net
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@jai-imageio.dev.java.net
> For additional commands, e-mail:
> interest-help@jai-imageio.dev.java.net
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@jai-imageio.dev.java.net
> For additional commands, e-mail:
> interest-help@jai-imageio.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai-imageio.dev.java.net
For additional commands, e-mail: interest-help@jai-imageio.dev.java.net

Fork Labs

Hello,

I seem to have read somewhere that arrays have a limit on their
length, 2^32 - 1 if I am not mistaken.

Many DataBuffer class use a single array to store the data.

Please post the the first few lines of the exception trace.

Is this a 3.2+ Gb image ?

Regards,

Daniel Léonard

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai-imageio.dev.java.net
For additional commands, e-mail: interest-help@jai-imageio.dev.java.net