Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx3.public.one.com ([10.246.18.23])
	by mail6.local.one.com (Dovecot) with LMTP id Q13gC6OibliU0AEAsyOMew
	for <filtered@awaresystems.be>; Thu, 05 Jan 2017 20:15:19 +0000
X-HalOne-ID: ad304506-d383-11e6-87b0-b82a72d83ab6
Received: from mail-oi0-f46.google.com (unknown [209.85.218.46])
	by mx3.public.one.com (Halon) with ESMTPS
	id ad304506-d383-11e6-87b0-b82a72d83ab6;
	Thu, 05 Jan 2017 20:15:19 +0000 (UTC)
Received: by mail-oi0-f46.google.com with SMTP id 128so398522251oig.0
        for <filtered@awaresystems.be>; Thu, 05 Jan 2017 12:15:18 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-original-authentication-results:x-gm-message-state:delivered-to
         :mime-version:in-reply-to:references:from:date:message-id:to:cc
         :subject:precedence:list-id:list-unsubscribe:list-archive:list-post
         :list-help:list-subscribe:content-transfer-encoding:sender:errors-to;
        bh=mdLSGiXSLgIXw5LP26HrFTqa9so5onNPJSqRRzmml6o=;
        b=clVxWYP+AOystV6TUmKL3Sx+9qq2AMptNNxiWllT6deBbmtOhlgTe5NqugZPcnXOU/
         WywwXq7OtJxySWQQM+4EdOdO51OP62MdT1Sm6MytF5S8kj0bfbjltO72I0IOfjMRPE5l
         5FFmeFhSGcrCPqiRf2ffHNq1Zm476ZqGJ7yRbydq9sQieegzWOZTlm2lJi//P0Ud3BKj
         XnMlWbhIPsFi+YoRo/dklut2NJzavZXhIhfL4juY27rU57eeLcNVLorOLEWZRpZf3EzI
         p5NepWk5A960+XkW2BrdieQg3uzPx6FTg2MUL+cg6c/4Lv2n7J14YnPNh1jqeBjTLBu6
         reXw==
X-Original-Authentication-Results: mx.google.com;       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org;       dmarc=fail (p=NONE dis=NONE) header.from=gmail.com
X-Gm-Message-State: AIkVDXLBs+rM3Fz/he9oO2p3JpD+qW/uEIvFzyfPFmIECE8Nn/BLhn45QG9edpCmsWdfbjvEOzVkATcjZTLYqs8KoUechHU=
X-Received: by 10.157.40.205 with SMTP id s71mr37783374ota.69.1483647317813;
        Thu, 05 Jan 2017 12:15:17 -0800 (PST)
X-Forwarded-To: filtered@awaresystems.be
X-Forwarded-For: awaresystems.be@gmail.com filtered@awaresystems.be
Delivered-To: awaresystems.be@gmail.com
Received: by 10.202.192.135 with SMTP id q129csp9087981oif;
        Thu, 5 Jan 2017 12:15:17 -0800 (PST)
X-Received: by 10.28.228.87 with SMTP id b84mr3399673wmh.0.1483647317001;
        Thu, 05 Jan 2017 12:15:17 -0800 (PST)
Return-Path: <tiff-bounces@lists.maptools.org>
Received: from lists.maptools.org (ks365428.kimsufi.com. [94.23.4.142])
        by mx.google.com with ESMTP id 202si50413wmf.85.2017.01.05.12.15.16;
        Thu, 05 Jan 2017 12:15:16 -0800 (PST)
Received-SPF: neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) client-ip=94.23.4.142;
Authentication-Results: mx.google.com;
       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org;
       dmarc=fail (p=NONE dis=NONE) header.from=gmail.com
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 9442835C030;
	Thu,  5 Jan 2017 15:14:34 -0500 (EST)
Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43])
	by lists.maptools.org (Postfix) with ESMTPS id 9BDB035C02D
	for <tiff@lists.maptools.org>; Thu,  5 Jan 2017 15:14:25 -0500 (EST)
Received: by mail-wm0-f43.google.com with SMTP id t79so857404wmt.0
	for <tiff@lists.maptools.org>; Thu, 05 Jan 2017 12:14:25 -0800 (PST)
X-Received: by 10.28.43.198 with SMTP id r189mr63052689wmr.67.1483647264803;
	Thu, 05 Jan 2017 12:14:24 -0800 (PST)
MIME-Version: 1.0
Received: by 10.28.214.195 with HTTP; Thu, 5 Jan 2017 12:14:24 -0800 (PST)
In-Reply-To: <CAAcuQeaKDexMmWtE_9PL1ta77cmp-_VydpoWs9GW9j1cNSR=kw@mail.gmail.com>
References: <CAMq1adozdzChVmAd4Yw06D0bpB3-5Yzji07DcNL6JOfMV1aUkQ@mail.gmail.com>
	<CAAcuQeaKDexMmWtE_9PL1ta77cmp-_VydpoWs9GW9j1cNSR=kw@mail.gmail.com>
From: Vincent Torri <vincent.torri@gmail.com>
Date: Thu, 5 Jan 2017 21:14:24 +0100
Message-ID: <CAMq1adrr-EQNmW_yA6ytnaJbT=UJ2k45OSHeyZ-4du5pDmpCpg@mail.gmail.com>
To: Olivier Paquet <olivier.paquet@gmail.com>
Cc: TIFF mailing list <tiff@lists.maptools.org>
Subject: Re: [Tiff] photometric value different when get from TIFF tag or
 from a TIFFRGBAImage
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

Hello

On Thu, Jan 5, 2017 at 8:55 PM, Olivier Paquet <olivier.paquet@gmail.com> wrote:
> 2017-01-05 14:30 GMT-05:00 Vincent Torri <vincent.torri@gmail.com>:
>>
>> I have attached a small test program which displays the photometric
>> value of an attached TIFF file
>>
>> from TIFFRGBAImage : value is 2
>> from TIFF tag, value is 32845
>> from TIFFPrintDirectory() (which uses TIFF flag ?) it is also 32845
>>
>> Is it normal or is it a bug ?
>
>
> I think it is normal. Your file is LogLuv but the RGBA API converts it to
> RGB for you. The man page of TIFFRGBAImageBegin mentions that.

ha, ok, it seems normal, indeed

>> which value should I choose in case there is no bug ?
>
>
> It depends what you need the value for. To interpret the data you get from
> the RGBA API, 2 (RGB) should be the correct value.


I am writing a multi-document viewer and i'm writing a plugin for TIFF
files with multiple directories. I want to display the informations of
the TIFF file (and directories too).
So I will use the tags

thank you

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