Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx2.public.one.com ([10.246.18.22])
	by mail6.local.one.com (Dovecot) with LMTP id qZg0JIqfblgTiAEAsyOMew
	for <filtered@awaresystems.be>; Thu, 05 Jan 2017 19:56:03 +0000
X-HalOne-ID: fb720dde-d380-11e6-a8f3-b82a72d88088
Received: from mail-oi0-f41.google.com (unknown [209.85.218.41])
	by mx2.public.one.com (Halon) with ESMTPS
	id fb720dde-d380-11e6-a8f3-b82a72d88088;
	Thu, 05 Jan 2017 19:56:01 +0000 (UTC)
Received: by mail-oi0-f41.google.com with SMTP id b126so592889157oia.2
        for <filtered@awaresystems.be>; Thu, 05 Jan 2017 11:56:01 -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:mime-version:sender:errors-to;
        bh=CPeZJ+lN5/gFKQEFND5zMh0lmnKeOFzxGeUowE62jc0=;
        b=kbf24OKAnfkrjQFKfuDJm35qrfTD7MH/QkLgvRjAUaMUCiy4X/9dyPmDRbuz5L0kxH
         6PTwYK2ufqg7ihu4xP98kCRGqO1ZM4INSMjep5P517kOk9SU4ZiN70dErSbiL0d1EMIg
         0nhHwgI+GLNF+AfPSwQNCCfphvkp42RTOJdkehAzlC+n8+39KhwC1lysqvD32qt9k5P2
         q7HU3cTeLhfpbpLGlCRxOzg8RyFioIULMj3rsvfirE0lazcOCB62+DtazhxsbqVG8ZpK
         Ugtq8OTr+iVvIK5jubfyp3nibpG+qp+en3ggfpu81nfn3//Sd7xMWqxutrZayzCELaDW
         czfw==
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 sp=NONE dis=NONE) header.from=gmail.com
X-Gm-Message-State: AIkVDXJYCnOaS9gYNEWUKUbDfSVTLI3O0+c1bRF1SAzO9mIPfcPKChQZ4NIy2HRbdpz95FW4bG+YRhUyJGpnQN97nLFWhF8=
X-Received: by 10.157.43.55 with SMTP id o52mr1237020otb.206.1483646160609;
        Thu, 05 Jan 2017 11:56:00 -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 q129csp9080349oif;
        Thu, 5 Jan 2017 11:55:59 -0800 (PST)
X-Received: by 10.28.30.207 with SMTP id e198mr67488781wme.74.1483646159604;
        Thu, 05 Jan 2017 11:55:59 -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 g2si7065wmc.50.2017.01.05.11.55.59;
        Thu, 05 Jan 2017 11:55:59 -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 sp=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 C949735C02C;
	Thu,  5 Jan 2017 14:55:16 -0500 (EST)
Received: from mail-oi0-f51.google.com (mail-oi0-f51.google.com
	[209.85.218.51])
	by lists.maptools.org (Postfix) with ESMTPS id 4FF5735C02A
	for <tiff@lists.maptools.org>; Thu,  5 Jan 2017 14:55:07 -0500 (EST)
Received: by mail-oi0-f51.google.com with SMTP id 3so409712772oih.1
	for <tiff@lists.maptools.org>; Thu, 05 Jan 2017 11:55:07 -0800 (PST)
X-Received: by 10.202.199.87 with SMTP id x84mr1207321oif.38.1483646106748;
	Thu, 05 Jan 2017 11:55:06 -0800 (PST)
MIME-Version: 1.0
Received: by 10.157.23.135 with HTTP; Thu, 5 Jan 2017 11:55:06 -0800 (PST)
In-Reply-To: <CAMq1adozdzChVmAd4Yw06D0bpB3-5Yzji07DcNL6JOfMV1aUkQ@mail.gmail.com>
References: <CAMq1adozdzChVmAd4Yw06D0bpB3-5Yzji07DcNL6JOfMV1aUkQ@mail.gmail.com>
From: Olivier Paquet <olivier.paquet@gmail.com>
Date: Thu, 5 Jan 2017 14:55:06 -0500
Message-ID: <CAAcuQeaKDexMmWtE_9PL1ta77cmp-_VydpoWs9GW9j1cNSR=kw@mail.gmail.com>
To: Vincent Torri <vincent.torri@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: multipart/mixed; boundary="===============0980879933=="
Mime-version: 1.0
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

--===============0980879933==
Content-Type: multipart/alternative; boundary=001a11c17cf82a4ca205455e47f4

--001a11c17cf82a4ca205455e47f4
Content-Type: text/plain; charset=UTF-8

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.

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.

Olivier

--001a11c17cf82a4ca205455e47f4
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">2017=
-01-05 14:30 GMT-05:00 Vincent Torri <span dir=3D"ltr">&lt;<a href=3D"mailt=
o:vincent.torri@gmail.com" target=3D"_blank">vincent.torri@gmail.com</a>&gt=
;</span>:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;b=
order-left:1px #ccc solid;padding-left:1ex">I have attached a small test pr=
ogram which displays the photometric<br>
value of an attached TIFF file<br>
<br>
from TIFFRGBAImage : value is 2<br>
from TIFF tag, value is 32845<br>
from TIFFPrintDirectory() (which uses TIFF flag ?) it is also 32845<br>
<br>
Is it normal or is it a bug ?<br></blockquote><div>=C2=A0</div><div>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.</div><div><br></div>=
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
which value should I choose in case there is no bug ?<br></blockquote><div>=
=C2=A0</div><div>It depends what you need the value for. To interpret the d=
ata you get from the RGBA API, 2 (RGB) should be the correct value.</div><d=
iv><br></div><div>Olivier</div><div><br></div></div></div></div>

--001a11c17cf82a4ca205455e47f4--

--===============0980879933==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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