Return-Path: <tiff-bounces@lists.maptools.org>
Delivered-To: info@awaresystems.be
Received: (qmail 31683 invoked from network); 18 Nov 2008 05:21:42 -0000
Received: from jack.telenet-ops.be ([195.130.136.5])
          (envelope-sender <tiff-bounces@lists.maptools.org>)
          by angelia.telenet-ops.be (qmail-ldap-1.03) with SMTP
          for <info@awaresystems.be>; 18 Nov 2008 05:21:42 -0000
Received: from waldo.telenet-ops.be (waldo.telenet-ops.be [195.130.136.10])
	by jack.telenet-ops.be (8.13.1/8.13.1) with ESMTP id mAI5Lg2t022849
	for <info@awaresystems.be>; Tue, 18 Nov 2008 06:21:42 +0100
Received: from localhost (localhost.localdomain [127.0.0.1])
	by waldo.telenet-ops.be (Postfix) with SMTP id 161F11C006
	for <info@awaresystems.be>; Tue, 18 Nov 2008 06:21:42 +0100 (CET)
Received: from ladon.telenet-ops.be (ladon.telenet-ops.be [195.130.132.50])
	by waldo.telenet-ops.be (Postfix) with ESMTP id 0FEFC1C004
	for <info@awaresystems.be>; Tue, 18 Nov 2008 06:21:42 +0100 (CET)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153])
	by ladon.telenet-ops.be (Postfix) with ESMTP id A36DE312774
	for <info@awaresystems.be>; Tue, 18 Nov 2008 06:21:41 +0100 (CET)
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id mAI5JCXf003096;
	Tue, 18 Nov 2008 00:20:09 -0500
Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.159])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id mAI5J90t003093
	for <tiff@lists.maptools.org>; Tue, 18 Nov 2008 00:19:10 -0500
Received: by fg-out-1718.google.com with SMTP id d23so2261016fga.41
	for <tiff@lists.maptools.org>; Mon, 17 Nov 2008 21:19:07 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:message-id:date:from:to
	:subject:mime-version:content-type:content-transfer-encoding
	:content-disposition;
	bh=9GEsuTYOQ75BJU58dlJCs+2h31vn4OqjKhAqPU2JvMo=;
	b=bLijmFKnuvfnrA7rG4zSxz+hSPVFDUIy/KSr9IF+oUcQcr9I30SHHm6zPCWQyPC3Bc
	Nq9UhO3M1iJCVan3kLNoeIzqv7ISS3ODN14peWrqxK4qmMwo2Z0t5sMD+0p+SITmQQsS
	xURkF1q6nRSi98InvcGTF3bpS0m8sNMDiHtH0=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=message-id:date:from:to:subject:mime-version:content-type
	:content-transfer-encoding:content-disposition;
	b=Dzdx0F9/CALRch+x3aHgkLxN0xe/wjg03QFk0nMrydWYoT3BLByTKv5uDxCR6XUcWj
	d2STDkOurV4Yvetfbky3rFT7vth/DKr8AYjXmmbR3z3uxPq8cDSsfw6/EL9bunTIQUEp
	6qOW2n9J3n5IF1Rmxjhco+zR+C3otmcci856k=
Received: by 10.187.225.12 with SMTP id c12mr610001far.9.1226985547694;
	Mon, 17 Nov 2008 21:19:07 -0800 (PST)
Received: by 10.187.163.4 with HTTP; Mon, 17 Nov 2008 21:19:07 -0800 (PST)
Message-ID: <e7b7bbdc0811172119k4a810bf5r3b3342deeb64eba8@mail.gmail.com>
Date: Tue, 18 Nov 2008 07:19:07 +0200
From: "Bogdan Cristea" <cristeab@gmail.com>
To: tiff@lists.maptools.org
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Subject: [Tiff] Reading class F TIFF file with Java Advanced Imaging (JAI)
	API
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-SpamCatcher-Score: 50 [XX]

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
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
