AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2008.11.18 05:19 "[Tiff] Reading class F TIFF file with Java Advanced Imaging (JAI) API", by Bogdan Cristea
2008.11.18 18:41 "Re: [Tiff] Reading class F TIFF file with Java Advanced Imaging (JAI) API", by Bogdan Cristea
2008.11.19 18:11 "Re: Re[Tiff] ading class F TIFF file with Java Advanced Imaging (JAI) API", by Bogdan Cristea

2008.11.18 18:41 "Re: [Tiff] Reading class F TIFF file with Java Advanced Imaging (JAI) API", by Bogdan Cristea

On Tue, Nov 18, 2008 at 6:29 PM, Simone Giannecchini <simboss1@gmail.com> wrote: > Ciao Bogdan,

> quick question did you use JAI or ImageIO to read the file. Notice > that JAI fileload operation is not recommended.

I use JAI API for reading the file. I'll try ImageIO and report back.

>
> Simone.
> -------------------------------------------------------
> Eng. Simone Giannecchini
> GeoSolutions S.A.S.
> Owner - Software Engineer
> Via Carignoni 51
> 55041 Camaiore (LU)
> Italy
>
> phone: +39 0584983027

> fax:      +39 0584983027
> mob:    +39 333 8128928

>
>
> http://www.geo-solutions.it
> http://simboss.blogspot.com/
> http://www.linkedin.com/in/simonegiannecchini
>
> -------------------------------------------------------
>
>
>

> On Tue, Nov 18, 2008 at 6:19 AM, Bogdan Cristea <cristeab@gmail.com> wrote:

Does anyone know how a class F TIFF file could be generated in order to be decoded with JAI?

The TIFF files generated in this way are viewable using ghfaxviewer or okular, but I get a runtime exception when using JAI. Any ideas?

Below is the error I get using my java app:

java.lang.RuntimeException: Invalid code encountered while decoding 2D group 4 compressed data.

        at com.sun.media.jai.codecimpl.TIFFFaxDecoder.decodeT6(TIFFFaxDecoder.java:1096)
        at com.sun.media.jai.codecimpl.TIFFImage.getTile(TIFFImage.java:1075)
        at com.sun.media.jai.codecimpl.SimpleRenderedImage.copyData(SimpleRenderedImage.java:552)
        at javax.media.jai.RenderedImageAdapter.copyData(RenderedImageAdapter.java:163)
        at javax.media.jai.PlanarImage.getAsBufferedImage(PlanarImage.java:2525)
        at javax.media.jai.PlanarImage.getAsBufferedImage(PlanarImage.java:2546)
        at TiffViewer.decodeImage(TiffViewer.java:95)
        at TiffViewer.init(TiffViewer.java:55)
        at TiffViewer.<init>(TiffViewer.java:45)
        at TiffViewer.main(TiffViewer.java:124)
Exception in thread "main" java.lang.NullPointerException
        at javax.swing.ImageIcon.<init>(ImageIcon.java:178)
        at TiffViewer.decodeImage(TiffViewer.java:105)
        at TiffViewer.init(TiffViewer.java:55)
        at TiffViewer.<init>(TiffViewer.java:45)
        at TiffViewer.main(TiffViewer.java:124)

>

--
Bogdan Cristea