Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-h.b-one.net (mx-h.one.com [91.198.169.55])
	by mail9.b-one.net (Postfix) with ESMTP id F120640021F
	for <info@awaresystems.be>; Tue, 16 Nov 2010 21:11:50 +0100 (CET)
Received: by mx-h.b-one.net (Postfix, from userid 106)
	id E1FB6360C; Tue, 16 Nov 2010 21:11:50 +0100 (CET)
X-Virus-Scanned: by one.com
X-Spam-Flag: NO
X-Spam-Score: 0
X-Spam-Level: 
X-Spam-Status: No, score=0 tagged_above=0 required=4 tests=[none]
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144]) by
 mx-h.b-one.net (Postfix) with ESMTP id 07E07360C for <info@awaresystems.be>;
 Tue, 16 Nov 2010 21:11:50 +0100 (CET)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by
 lists.maptools.org (Postfix) with ESMTP id 8F1431D0E529B; Tue, 16 Nov 2010
 15:10:52 -0500 (EST)
Received: from ppsw-41.csi.cam.ac.uk (ppsw-41.csi.cam.ac.uk [131.111.8.141])
 by lists.maptools.org (Postfix) with ESMTP id 077E01D0E5248 for
 <tiff@lists.maptools.org>; Tue, 16 Nov 2010 15:09:31 -0500 (EST)
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: not scanned
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from hermes-2.csi.cam.ac.uk ([131.111.8.54]:44708) by
 ppsw-41.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.156]:25) with esmtpa
 (EXTERNAL:er258) id 1PIRqL-0001tt-Se (Exim 4.72) (return-path
 <er258@hermes.cam.ac.uk>); Tue, 16 Nov 2010 20:09:29 +0000
Received: from er258 (helo=localhost) by hermes-2.csi.cam.ac.uk
 (hermes.cam.ac.uk) with local-esmtp id 1PIRqL-0007gQ-S4 (Exim 4.67)
 (return-path <er258@hermes.cam.ac.uk>); Tue, 16 Nov 2010 20:09:29 +0000
Date: Tue, 16 Nov 2010 20:09:29 +0000 (GMT)
From: "E. Rosten" <er258@cam.ac.uk>
X-X-Sender: er258@hermes-2.csi.cam.ac.uk
To: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
In-Reply-To: <alpine.GSO.2.01.1011161318490.17725@freddy.simplesystems.org>
Message-ID: <alpine.LSU.2.00.1011161927410.23748@hermes-2.csi.cam.ac.uk>
References: <alpine.LSU.2.00.1011161739080.23748@hermes-2.csi.cam.ac.uk>
 <alpine.GSO.2.01.1011161318490.17725@freddy.simplesystems.org>
User-Agent: Alpine 2.00 (LSU 1167 2008-08-23)
MIME-Version: 1.0
Cc: tiff@lists.maptools.org
Subject: Re: [Tiff] unknown field with tag 317 (0x13d) encountered.
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
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>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

On Tue, 16 Nov 2010, Bob Friesenhahn wrote:

> On Tue, 16 Nov 2010, E. Rosten wrote:
>> I'm trying to read a TIFF file, which seems to have the predictor set. I
>> get the error message:
>> 
>> TIFFReadDirectory: Warning, std::istream: unknown field with tag 317 
>> (0x13d) encountered.
>> 
>> and the TIFF appears to be quantized to a very small number of levels.
>> This is from my own software and I get very similar results from other
>> software installed on the system. I have tried the latest version (3.9.4),
>> with the following results from the configure script:
>
> This file seems to use 16-bits per sample.  Perhaps the "quantization" you 
> are seeing is due to 16-bits being squashed down to 8-bits/sample as 
> supported by common image display software.  Sometimes 16-bit/sample images 
> only use levels which don't map well to 8-bit. This is a common problem.

Ah! Thanks. I've found the bug. It appears that this TIFF doesn't have 
samplesperpixel set, and I wasn't defaulting it properly to 1. So, I was 
calling the cooked RGB interface because I didn't know how to cope with 0 
samples per pixel.

I guess the unknown tag was a red herring.

Thanks!x

-Ed


-- 
Edward Rosten                     Machine Intelligence Laboratory
http://mi.eng.cam.ac.uk/~er258          Department of Engineering
+44 1223 7 65960                          University of Cambridge


_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
