Skip to main content

Facing some errors..could anyone help please??

1 reply [Last post]
sobhaduvvuri
Offline
Joined: 2009-08-21

Hello,

I am new to JAI and am trying to extract some metadata information from an image.The images are multiband tiff images and i come across these errors when I try to read them using :

PlanarImage pi=JAI.create("fileload",args[0]);

Errors:
Error: Cannot decode the image for the type :
Occurs in: com.sun.media.jai.opimage.CodecRIFUtil
java.io.IOException: Planar (band-sequential) format TIFF is not supported.
at com.sun.media.jai.codecimpl.CodecUtils.toIOException(CodecUtils.java:76)
at com.sun.media.jai.codecimpl.TIFFImageDecoder.decodeAsRenderedImage(TIFFImageDecoder.java:109)
at com.sun.media.jai.opimage.CodecRIFUtil.create(CodecRIFUtil.java:88)
at com.sun.media.jai.opimage.TIFFRIF.create(TIFFRIF.java:45)
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 com.sun.media.jai.opimage.StreamRIF.create(StreamRIF.java:102)
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 com.sun.media.jai.opimage.FileLoadRIF.create(FileLoadRIF.java:144)
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.getHeight(RenderedOp.java:2188)
at ImageRead.main(ImageRead.java:11)
Caused by: java.lang.RuntimeException: Planar (band-sequential) format TIFF is not supported.
at com.sun.media.jai.codecimpl.TIFFImage.(TIFFImage.java:334)
at com.sun.media.jai.codecimpl.TIFFImageDecoder.decodeAsRenderedImage(TIFFImageDecoder.java:107)
... 32 more
Error: IOException occurs when decode the image.
Occurs in: com.sun.media.jai.opimage.StreamRIF
java.io.IOException: Planar (band-sequential) format TIFF is not supported.
at com.sun.media.jai.codecimpl.CodecUtils.toIOException(CodecUtils.java:76)
at com.sun.media.jai.codecimpl.TIFFImageDecoder.decodeAsRenderedImage(TIFFImageDecoder.java:109)
at com.sun.media.jai.codec.ImageDecoderImpl.decodeAsRenderedImage(ImageDecoderImpl.java:140)
at com.sun.media.jai.opimage.StreamRIF.create(StreamRIF.java:135)
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 com.sun.media.jai.opimage.FileLoadRIF.create(FileLoadRIF.java:144)
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.getHeight(RenderedOp.java:2188)
at ImageRead.main(ImageRead.java:11)
Caused by: java.lang.RuntimeException: Planar (band-sequential) format TIFF is not supported.
at com.sun.media.jai.codecimpl.TIFFImage.(TIFFImage.java:334)
at com.sun.media.jai.codecimpl.TIFFImageDecoder.decodeAsRenderedImage(TIFFImageDecoder.java:107)
... 23 more
Exception in thread "main" java.lang.RuntimeException: - Unable to render RenderedOp for this operation.
at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:827)
at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
at javax.media.jai.RenderedOp.getHeight(RenderedOp.java:2188)
at ImageRead.main(ImageRead.java:11)

When i try to manipulate the code, I get this error
Error:
Exception in thread "main" java.lang.RuntimeException: - Unable to render RenderedOp for this operation.
at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:827)
at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
at javax.media.jai.RenderedOp.getHeight(RenderedOp.java:2188)
at getPixel.main(getPixel.java:20)

May I please know if JAI supports multiband tiff images?
Thanks in advance.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Bob Deen

Hi...

The codecs have been deprecated and are rather old; as the stack trace
says the specific TIFF variant in your files is not supported by them.

So get the JAI Image I/O Tools, install it too, and use "imageread"
instead of "fileload". It'll use a newer TIFF reader. I can't
guarantee it'll support this format variant either, but it might.

Hope that helps...

-Bob

jai-interest@javadesktop.org wrote:
> Hello,
>
> I am new to JAI and am trying to extract some metadata information from an image.The images are multiband tiff images and i come across these errors when I try to read them using :
>
> PlanarImage pi=JAI.create("fileload",args[0]);
>
> Errors:
> Error: Cannot decode the image for the type :
> Occurs in: com.sun.media.jai.opimage.CodecRIFUtil
> java.io.IOException: Planar (band-sequential) format TIFF is not supported.
> at com.sun.media.jai.codecimpl.CodecUtils.toIOException(CodecUtils.java:76)
> at com.sun.media.jai.codecimpl.TIFFImageDecoder.decodeAsRenderedImage(TIFFImageDecoder.java:109)
> at com.sun.media.jai.opimage.CodecRIFUtil.create(CodecRIFUtil.java:88)
> at com.sun.media.jai.opimage.TIFFRIF.create(TIFFRIF.java:45)
> 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 com.sun.media.jai.opimage.StreamRIF.create(StreamRIF.java:102)
> 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 com.sun.media.jai.opimage.FileLoadRIF.create(FileLoadRIF.java:144)
> 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.getHeight(RenderedOp.java:2188)
> at ImageRead.main(ImageRead.java:11)
> Caused by: java.lang.RuntimeException: Planar (band-sequential) format TIFF is not supported.
> at com.sun.media.jai.codecimpl.TIFFImage.(TIFFImage.java:334)
> at com.sun.media.jai.codecimpl.TIFFImageDecoder.decodeAsRenderedImage(TIFFImageDecoder.java:107)
> ... 32 more
> Error: IOException occurs when decode the image.
> Occurs in: com.sun.media.jai.opimage.StreamRIF
> java.io.IOException: Planar (band-sequential) format TIFF is not supported.
> at com.sun.media.jai.codecimpl.CodecUtils.toIOException(CodecUtils.java:76)
> at com.sun.media.jai.codecimpl.TIFFImageDecoder.decodeAsRenderedImage(TIFFImageDecoder.java:109)
> at com.sun.media.jai.codec.ImageDecoderImpl.decodeAsRenderedImage(ImageDecoderImpl.java:140)
> at com.sun.media.jai.opimage.StreamRIF.create(StreamRIF.java:135)
> 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 com.sun.media.jai.opimage.FileLoadRIF.create(FileLoadRIF.java:144)
> 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.getHeight(RenderedOp.java:2188)
> at ImageRead.main(ImageRead.java:11)
> Caused by: java.lang.RuntimeException: Planar (band-sequential) format TIFF is not supported.
> at com.sun.media.jai.codecimpl.TIFFImage.(TIFFImage.java:334)
> at com.sun.media.jai.codecimpl.TIFFImageDecoder.decodeAsRenderedImage(TIFFImageDecoder.java:107)
> ... 23 more
> Exception in thread "main" java.lang.RuntimeException: - Unable to render RenderedOp for this operation.
> at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:827)
> at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
> at javax.media.jai.RenderedOp.getHeight(RenderedOp.java:2188)
> at ImageRead.main(ImageRead.java:11)
>
> When i try to manipulate the code, I get this error
> Error:
> Exception in thread "main" java.lang.RuntimeException: - Unable to render RenderedOp for this operation.
> at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:827)
> at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867)
> at javax.media.jai.RenderedOp.getHeight(RenderedOp.java:2188)
> at getPixel.main(getPixel.java:20)
>
> May I please know if JAI supports multiband tiff images?
> Thanks in advance.
> [Message sent by forum member 'sobhaduvvuri' (sobhaduvvuri)]
>
> http://forums.java.net/jive/thread.jspa?messageID=361687
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@jai.dev.java.net
> For additional commands, e-mail: interest-help@jai.dev.java.net
>

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