Skip to main content

TIFF 51200x108544: fileload works but imageread fails

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
darwinjob
Offline
Joined: 2004-11-16

Isn't it weird? When I "imagewrite" it spits this exception:
Error: One factory fails for the operation "imagewrite"
Occurs in: javax.media.jai.ThreadSafeOperationRegistry
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at javax.media.jai.FactoryCache.invoke(FactoryCache.java:122)
at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1674)
at javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperationRegistry.java:473)
at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:332)
at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:819)
at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
at javax.media.jai.RenderedOp.getRendering(RenderedOp.java:888)
at javax.media.jai.JAI.createNS(JAI.java:1099)
at javax.media.jai.JAI.create(JAI.java:973)
at javax.media.jai.JAI.create(JAI.java:1621)
Caused by: java.lang.IllegalArgumentException: width*height > Integer.MAX_VALUE!
at javax.imageio.ImageReader.getDestination(Unknown Source)
at com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader.read(TIFFImageReader.java:1154)
at com.sun.media.jai.imageioimpl.ImageReadOpImage.computeTile(ImageReadOpImage.java:697)
at com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)
at javax.media.jai.OpImage.getTile(OpImage.java:1129)
at com.sun.media.jai.opimage.CropOpImage.getTile(CropOpImage.java:122)
at javax.media.jai.PlanarImage.getData(PlanarImage.java:2085)
at com.sun.imageio.plugins.png.PNGImageWriter.encodePass(Unknown Source)
at com.sun.imageio.plugins.png.PNGImageWriter.write_IDAT(Unknown Source)
at com.sun.imageio.plugins.png.PNGImageWriter.write(Unknown Source)
at com.sun.media.jai.imageioimpl.ImageWriteCRIF.create(ImageWriteCRIF.java:581)
at com.sun.media.jai.imageioimpl.ImageWriteCRIF.create(ImageWriteCRIF.java:231)
... 39 more

But it works fine with "fileload"

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
rgd
Offline
Joined: 2005-08-23

You may need to do something to explicitly tell imageread to tile the
image. Perhaps a rendering hint when creating the imageread op? I
would hope it does that by default if the source is tiled (is it?) but
maybe not.

-Bob

On 12/16/10 3:00 AM, forums@java.net wrote:
> Isn't it weird? When I "imagewrite" it spits this exception:
>
> Error: One factory fails for the operation "imagewrite"
> Occurs in: javax.media.jai.ThreadSafeOperationRegistry
> java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at javax.media.jai.FactoryCache.invoke(FactoryCache.java:122)
> at
> javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1674)
>
> at
> javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperationRegistry.java:473)
>
> at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:332)
> at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:819)
> at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
> at javax.media.jai.RenderedOp.getRendering(RenderedOp.java:888)
> at javax.media.jai.JAI.createNS(JAI.java:1099)
> at javax.media.jai.JAI.create(JAI.java:973)
> at javax.media.jai.JAI.create(JAI.java:1621)
>
> Caused by: java.lang.IllegalArgumentException: width*height >
> Integer.MAX_VALUE!
> at javax.imageio.ImageReader.getDestination(Unknown Source)
> at
> com.sun.media.imageioimpl.plugins.tiff.TIFFImageReader.read(TIFFImageReader.java:1154)
>
> at
> com.sun.media.jai.imageioimpl.ImageReadOpImage.computeTile(ImageReadOpImage.java:697)
>
> at
> com.sun.media.jai.util.SunTileScheduler.scheduleTile(SunTileScheduler.java:904)
>
> at javax.media.jai.OpImage.getTile(OpImage.java:1129)
> at com.sun.media.jai.opimage.CropOpImage.getTile(CropOpImage.java:122)
> at javax.media.jai.PlanarImage.getData(PlanarImage.java:2085)
> at com.sun.imageio.plugins.png.PNGImageWriter.encodePass(Unknown
> Source)
> at com.sun.imageio.plugins.png.PNGImageWriter.write_IDAT(Unknown
> Source)
> at com.sun.imageio.plugins.png.PNGImageWriter.write(Unknown Source)
> at
> com.sun.media.jai.imageioimpl.ImageWriteCRIF.create(ImageWriteCRIF.java:581)
>
> at
> com.sun.media.jai.imageioimpl.ImageWriteCRIF.create(ImageWriteCRIF.java:231)
>
> ... 39 more
>
>
>
> But it works fine with "fileload"
>
>