*
The moose likes Other JSE/JEE APIs and the fly likes Multi tiff to single tiff conversion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Multi tiff to single tiff conversion" Watch "Multi tiff to single tiff conversion" New topic
Author

Multi tiff to single tiff conversion

Rodricks george
Ranch Hand

Joined: Sep 10, 2006
Posts: 97
Dear Sir,

I am scanning some files and saving the files in to Multi tiff files.
While i convert into single tiff file with compression mode i am getting the following error. I have tried with all possible compression.... still no result.


This TIF has 7 image(s)
Saving E:\tiffimages\single_0.tiff
Error: One factory fails for the operation "encode"
Occurs in: javax.media.jai.ThreadSafeOperationRegistry
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
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.FileStoreRIF.create(FileStoreRIF.java:138)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
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:1395)
at org.single.tiff.TestTiff.doitJAI(TestTiff.java:42)
at org.single.tiff.TestTiff.main(TestTiff.java:18)
Caused by: java.lang.RuntimeException: Bilevel encodings are supported for bilevel images only.
at com.sun.media.jai.codecimpl.TIFFImageEncoder.encode(TIFFImageEncoder.java:378)
at com.sun.media.jai.codecimpl.TIFFImageEncoder.encode(TIFFImageEncoder.java:151)
at com.sun.media.jai.opimage.EncodeRIF.create(EncodeRIF.java:70)
... 25 more
Error: One factory fails for the operation "filestore"
Occurs in: javax.media.jai.ThreadSafeOperationRegistry
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
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:1395)
at org.single.tiff.TestTiff.doitJAI(TestTiff.java:42)
at org.single.tiff.TestTiff.main(TestTiff.java:18)
Caused by: javax.media.jai.util.ImagingException: All factories fail for the operation "encode"
at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1687)
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.FileStoreRIF.create(FileStoreRIF.java:138)
... 16 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at javax.media.jai.FactoryCache.invoke(FactoryCache.java:122)
at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1674)
... 19 more
Caused by: java.lang.RuntimeException: Bilevel encodings are supported for bilevel images only.
at com.sun.media.jai.codecimpl.TIFFImageEncoder.encode(TIFFImageEncoder.java:378)
at com.sun.media.jai.codecimpl.TIFFImageEncoder.encode(TIFFImageEncoder.java:151)
at com.sun.media.jai.opimage.EncodeRIF.create(EncodeRIF.java:70)
... 25 more
javax.media.jai.util.ImagingException: All factories fail for the operation "filestore"
at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1687)
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:1395)
at org.single.tiff.TestTiff.doitJAI(TestTiff.java:42)
at org.single.tiff.TestTiff.main(TestTiff.java:18)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at javax.media.jai.FactoryCache.invoke(FactoryCache.java:122)
at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1674)
... 10 more
Caused by: javax.media.jai.util.ImagingException: All factories fail for the operation "encode"
at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1687)
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.FileStoreRIF.create(FileStoreRIF.java:138)
... 16 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at javax.media.jai.FactoryCache.invoke(FactoryCache.java:122)
at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1674)
... 19 more
Caused by: java.lang.RuntimeException: Bilevel encodings are supported for bilevel images only.
at com.sun.media.jai.codecimpl.TIFFImageEncoder.encode(TIFFImageEncoder.java:378)
at com.sun.media.jai.codecimpl.TIFFImageEncoder.encode(TIFFImageEncoder.java:151)
at com.sun.media.jai.opimage.EncodeRIF.create(EncodeRIF.java:70)
... 25 more
Exception in thread "main"








please solve the problem....

-Rodricks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41087
    
  43
The root cause seems to be
Caused by: java.lang.RuntimeException: Bilevel encodings are supported for bilevel images only.


Is the encoding you're using appropriate for the kind of image you have?
[ July 26, 2007: Message edited by: Ulf Dittmer ]

Ping & DNS - my free Android networking tools app
Rodricks george
Ranch Hand

Joined: Sep 10, 2006
Posts: 97
Dear Sir,

Now its working fine.... I scanned a B/W images and set the compression.... and now i can compress it again while i convert to single tiff.


-Rodricks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Multi tiff to single tiff conversion
 
Similar Threads
Invocation target Exception
problems while converting
Email validation does not work
Image Rotation
Split multi-page tiff throwing: End of data reached before next EOL