Skip to main content

TIFF reader exception: width*height > Integer.MAX_VALUE, bug or feature?

1 reply [Last post]
nyholku
Offline
Joined: 2005-03-15

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 (

Reply viewing options

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

but what is the actual reading method you're using on the ImageReader?

Haven't we been over this exact thing, or am I just experiencing deja
vu?

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