Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-q.b-one.net (mx-q.one.com [91.198.169.248])
	by mail9.b-one.net (Postfix) with ESMTP id E4F52400B7B
	for <info@awaresystems.be>; Fri, 30 Apr 2010 03:36:35 +0200 (CEST)
Received: by mx-q.b-one.net (Postfix, from userid 106)
	id DB039B2F48AD; Fri, 30 Apr 2010 03:36:35 +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-q.b-one.net (Postfix) with ESMTP id 1A093B2F48AD for
 <info@awaresystems.be>; Fri, 30 Apr 2010 03:36:35 +0200 (CEST)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by
 lists.maptools.org (Postfix) with ESMTP id 6663E1D31CF1E; Thu, 29 Apr 2010
 20:36:04 -0500 (EST)
Received: from mail-pz0-f181.google.com (mail-pz0-f181.google.com
 [209.85.222.181]) by lists.maptools.org (Postfix) with ESMTP id BC0F31D31CF19
 for <tiff@lists.maptools.org>; Thu, 29 Apr 2010 20:35:37 -0500 (EST)
Received: by pzk11 with SMTP id 11so8815229pzk.28 for
 <tiff@lists.maptools.org>; Thu, 29 Apr 2010 18:35:36 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.142.74.1 with SMTP id w1mr5973812wfa.258.1272591336286; Thu, 
 29 Apr 2010 18:35:36 -0700 (PDT)
Received: by 10.143.163.20 with HTTP; Thu, 29 Apr 2010 18:35:36 -0700 (PDT)
In-Reply-To: <B18FE740-54FF-481E-AA22-C8DD808A5194@telegraphics.com.au>
References: <s2l121b97401004291631y3dca28bdlbdde60166aece090@mail.gmail.com>
 <h2x121b97401004291638jd070ab1dw43d558eb9238f0c3@mail.gmail.com>
 <B18FE740-54FF-481E-AA22-C8DD808A5194@telegraphics.com.au>
Date: Thu, 29 Apr 2010 18:35:36 -0700
X-Google-Sender-Auth: 1f7c35cbaffd0fb8
Message-ID: <g2x121b97401004291835o1bfd915exa3d641a81bca586d@mail.gmail.com>
From: Dmitry Fedorov <dima@dimin.net>
To: Toby Thain <toby@telegraphics.com.au>
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

> 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?

I haven't probably expressed myself correctly. The idea was to
user-pass the "flexible" mode, that would enable some of these less
stringent checks. Thus by default it would work exactly the same way
and fail in the aforementioned case.

There two (as of now) cases when libtiff wouldn't return me a handle
from TIFFClientOpen, the palette and
TIFFReadDirEntryPersampleShort fails in:
if (direntry->tdir_count != (uint64)tif->tif_dir.td_samplesperpixel)
and is fixed by:
if (direntry->tdir_count < (uint64)tif->tif_dir.td_samplesperpixel)

I have many patches that I can apply after getting a tiff handle from
TIFFClientOpen, but if I get nothing I'm dead in the water.


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

I've submitted the following tickets to bugzilla because, for obvious
reasons, 1) updates may required manual patching some times, 2) I feel
these patches may be useful for others, 3) they are not obviously
breaking the library.

Cheers,
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/
