Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-s.b-one.net (mx-s.one.com [91.198.169.250])
	by mail9.b-one.net (Postfix) with ESMTP id 77453400400
	for <info@awaresystems.be>; Tue, 27 Apr 2010 05:43:55 +0200 (CEST)
Received: by mx-s.b-one.net (Postfix, from userid 106)
	id 1AAB54E34AB6; Tue, 27 Apr 2010 05:43:55 +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-s.b-one.net (Postfix) with ESMTP id 40AC8469 for <info@awaresystems.be>;
 Tue, 27 Apr 2010 05:43:54 +0200 (CEST)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by
 lists.maptools.org (Postfix) with ESMTP id 1FF2E1D18B152; Mon, 26 Apr 2010
 22:42:32 -0500 (EST)
Received: from mail.howardsilvan.com (216-235-106-HCC-115.hcc.net
 [216.235.106.115]) by lists.maptools.org (Postfix) with ESMTPS id
 8C5321D18E0D4 for <tiff@lists.maptools.org>; Mon, 26 Apr 2010 22:38:50 -0500
 (EST)
Received: from fangorn.howardsilvan.com (localhost [127.0.0.1]) by
 mail.howardsilvan.com (Postfix) with ESMTP id 9A933C420DA; Mon, 26 Apr 2010
 20:38:39 -0700 (PDT)
Received: from bilbo.x101.com ([64.146.212.27] helo=bilbo.x101.com) with
 IPv4:25 by fangorn.howardsilvan.com; 26 Apr 2010 20:38:39 -0700
Message-ID: <4BD65C3E.7080803@howardsilvan.com>
Date: Mon, 26 Apr 2010 20:38:38 -0700
From: Lee Howard <faxguy@howardsilvan.com>
User-Agent: Thunderbird 2.0.0.19 (X11/20090105)
MIME-Version: 1.0
To: Edward Lam <edward@sidefx.com>
References: <1259514127-14723-1-git-send-email-adam@spicenitz.org>
 <1259514127-14723-2-git-send-email-adam@spicenitz.org>
 <1259514127-14723-3-git-send-email-adam@spicenitz.org>
 <4BD60A12.4080509@sidefx.com>
In-Reply-To: <4BD60A12.4080509@sidefx.com>
Cc: tiff@lists.maptools.org
Subject: Re: [Tiff] [CRITICAL] libtiff 3.9.3 incorrectly writes out
 TIFFTAG_REFERENCEBLACKWHITE tags
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

Please file a bug report on Bugzilla so your work does not get lost.

Thanks,

Lee.


Edward Lam wrote:
> Hi,
>
> I'm currently trying to upgrade from libtiff 3.7.0 to libtiff 3.9.3 and 
> found a serious problem in its handling of TIFFTAG_REFERENCEBLACKWHITE. 
> The problem was unintentionally fixed in libtiff 4.0 due to Adam Goode's 
> patch (http://www.asmail.be/msg0054714754.html).
>
> I haven't analyzed it too much yet but applying Adam's patch to 3.9.3 
> causes my libtiff usage to work again. When we create an TIFF image, we 
> have code which sets the black/white points as follows:
> ...
> 	float points[6];
> ...
> 	// set black/white points.
> 	points[0] = points[2] = points[4] = black;
> 	points[1] = points[3] = points[5] = white;
> 	TIFFSetField(myTiff, TIFFTAG_REFERENCEBLACKWHITE, &points);
> ...
> This causes the TIFF file to be generated with:
> ...
> ReferenceBlackWhite (532) LONG (4) 6<0 1132396544 0 1132396544 0 1132396544>
> ...
> The correct tag should be:
> ...
> ReferenceBlackWhite (532) RATIONAL (5) 6<0 255 0 255 0 255>
> ...
>
> Any ideas?
>
> Thanks,
> -Edward
> _______________________________________________
> 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/
