Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-j.b-one.net (mx-j.one.com [91.198.169.57])
	by mail9.b-one.net (Postfix) with ESMTP id 92017400B7B
	for <info@awaresystems.be>; Fri, 30 Apr 2010 02:05:03 +0200 (CEST)
Received: by mx-j.b-one.net (Postfix, from userid 106)
	id 89EE98C533B2; Fri, 30 Apr 2010 02:05:03 +0200 (CEST)
X-Virus-Scanned: by one.com
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-j.b-one.net (Postfix) with ESMTP id 7E0868C533B2 for
 <info@awaresystems.be>; Fri, 30 Apr 2010 02:05:02 +0200 (CEST)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by
 lists.maptools.org (Postfix) with ESMTP id D76DD1D31CE88; Thu, 29 Apr 2010
 19:04:18 -0500 (EST)
Received: from toronto2.smartgames.ca (toronto2.smartgames.ca
 [204.15.192.18]) by lists.maptools.org (Postfix) with ESMTP id 9EB051D26692F
 for <tiff@lists.maptools.org>; Thu, 29 Apr 2010 18:59:53 -0500 (EST)
Received: from [10.143.176.38] (unknown [10.143.176.38]) by
 toronto2.smartgames.ca (Postfix) with ESMTP id C71407B350; Thu, 29 Apr 2010
 20:01:06 -0400 (EDT)
Message-Id: <B18FE740-54FF-481E-AA22-C8DD808A5194@telegraphics.com.au>
From: Toby Thain <toby@telegraphics.com.au>
To: Dmitry Fedorov <dima@dimin.net>
In-Reply-To: <h2x121b97401004291638jd070ab1dw43d558eb9238f0c3@mail.gmail.com>
Mime-Version: 1.0 (Apple Message framework v936)
Date: Fri, 30 Apr 2010 09:59:48 +1000
References: <s2l121b97401004291631y3dca28bdlbdde60166aece090@mail.gmail.com>
 <h2x121b97401004291638jd070ab1dw43d558eb9238f0c3@mail.gmail.com>
X-Mailer: Apple Mail (2.936)
Cc: TIFF <tiff@lists.maptools.org>
Subject: Re: [Tiff] "flexible" mode in TIFFClientOpen ?
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 30-Apr-10, at 9:38 AM, Dmitry Fedorov wrote:

> Hi all,
>
> I work with libbioimage a library used to decode end encode several
> biological image formats and their metadata. Many of these are some
> variants of TIFF images, usually not exactly well formed but still we
> have to decode them. I use libtiff 4 b5 for decoding all of these
> variants supplying some run-time fixes to libtiff decoding behavior by
> knowing which format variant it is based on existing tags. I do run
> into some trouble when libtiff decides the image is invalid it would
> not decode it. It may happen for some silly reasons that would not
> hinder decoding the image completely. For example: in 1 channel image
> photometric is set to PALETTE and no palette is present, libtiff will
> stop right there, though if I simply set photometric to MINISBLACK
> everything will work.
>
> I could imagine it would be a reasonable proposal to add another
> option to the modes passed within TIFFClientOpen to force the decoder
> to be less stringent, say "f" for flexible. Thus I could allow certain
> flexibility on these decoding issues when I really need to.
>
> I would be more than glad to draft the code change and submit it if it
> is considered useful.


It is much more than just adding a flag, but involves changing a large  
number of consistency checks in fairly arbitrary ways. While the  
"missing palette" issue above is resolved for your image by assuming  
grey scale, can you defend it as a general heuristic? What other  
specific checks do your files fail?

Wouldn't it be easy just to maintain your own modified libtiff for  
your own circumstances?

--Toby



> Dmitry
>
> -- 
> __________________________________
>
> Dmitry Fedorov Levit
>  <dima@dimin.net> <http://www.dimin.net/>
> Skype: dima_fedorov
> Google: fedorov
> __________________________________
>
> Center for Bio-Image Informatics:
>  <http://www.bioimage.ucsb.edu/>
>
> Vision Research Lab, Electrical and Computer Engineering
> Image Registration:
>  <http://vision.ece.ucsb.edu/>
>  <http://vision.ece.ucsb.edu/registration/demo/>
>  <http://regima.dpi.inpe.br/>
>
> University of California, Santa Barbara
> _________________________________
>
> DIMIN Viewer n5:
>  <http://www.dimin.net/software/viewer/>
> __________________________________
> _______________________________________________
> Tiff mailing list: Tiff@lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/tiff
> http://www.remotesensing.org/libtiff/

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