Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx-r.one.com (mx-r.one.com [91.198.169.249])
	by mail6.local (Postfix) with ESMTP id B4B3E8014FA02
	for <filtered@awaresystems.be>; Fri, 14 Jun 2013 14:46:17 +0200 (CEST)
X-Virus-Scanned: by one.com
Received-SPF: pass (mx-r: domain of awaresystems.be+caf_=filtered=awaresystems.be@gmail.com designates 209.85.217.173 as permitted sender)
X-Greylist: whitelisted by SQLgrey-1.8.0-rc2
Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com [209.85.217.173])
	by mx-r.one.com (Postfix) with ESMTP id 7883211496DA
	for <filtered@awaresystems.be>; Fri, 14 Jun 2013 12:46:17 +0000 (UTC)
Received: by mail-lb0-f173.google.com with SMTP id v1so550893lbd.32
        for <filtered@awaresystems.be>; Fri, 14 Jun 2013 05:46:17 -0700 (PDT)
X-Received: by 10.152.120.105 with SMTP id lb9mr1123368lab.20.1371213977027;
        Fri, 14 Jun 2013 05:46:17 -0700 (PDT)
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.114.62.81 with SMTP id w17csp30666ldr;
        Fri, 14 Jun 2013 05:46:16 -0700 (PDT)
X-Received: by 10.112.201.10 with SMTP id jw10mr1051227lbc.58.1371213976039;
        Fri, 14 Jun 2013 05:46:16 -0700 (PDT)
DomainKey-Status: bad format
Received-SPF: neutral (google.com: 91.198.169.55 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) client-ip=91.198.169.55;
Received: by 10.112.74.75 with POP3 id r11mf379922lbv.16;
        Fri, 14 Jun 2013 05:46:15 -0700 (PDT)
X-Gmail-Fetch-Info: info@awaresystems.be 1 pop.awaresystems.be 110 info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-h.one.com (mx-h.one.com [91.198.169.55])
	by mail6.local (Postfix) with ESMTP id C20608014FA04
	for <info@awaresystems.be>; Fri, 14 Jun 2013 14:13:47 +0200 (CEST)
X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2
Received: from lists.maptools.org (ks365428.kimsufi.com [94.23.4.142])
	by mx-h.one.com (Postfix) with ESMTP id B717D2212263
	for <info@awaresystems.be>; Fri, 14 Jun 2013 12:13:46 +0000 (UTC)
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 6E7A335C02B;
	Fri, 14 Jun 2013 07:13:10 -0500 (EST)
Received: from csmtp13.one.com (csmtp13.one.com [195.47.247.113])
	by lists.maptools.org (Postfix) with ESMTPS id 6EDF335C02B
	for <tiff@lists.maptools.org>; Fri, 14 Jun 2013 07:12:22 -0500 (EST)
Received: from mail-la0-f53.google.com (mail-la0-f53.google.com
	[209.85.215.53])
	by csmtp13.one.com (Postfix) with ESMTPA id C11434000C469
	for <tiff@lists.maptools.org>; Fri, 14 Jun 2013 12:03:01 +0000 (UTC)
Received: from mail-la0-f53.google.com (mail-la0-f53.google.com
	[209.85.215.53]) (using TLSv1 with cipher RC4-SHA)
	by 0.0.0.0:2500 (trex/4.8.65); Fri, 14 Jun 2013 12:00:12 GMT
Received: by mail-la0-f53.google.com with SMTP id fs12so452435lab.12
	for <tiff@lists.maptools.org>; Fri, 14 Jun 2013 05:03:01 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=google.com; s=20120113;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	bh=mMeVmN8SZgcBt/ChT95wttL4GM7Awx7DG+SQkYXrukE=;
	b=geeow+xctKhlZs4+pd4Y/LChwlYP8QE3jOAeizQvUjqmbKVY8/MbambWYp+y9T5vB9
	DBz8yutnePkTJ+kbtESyGiJTxPBeGmLXoU8km7fSngPNyYY9U8ayXSRndgIZbe9hj2bv
	U7TErBYzt5tswQhIye+ysPo4fUem/Dnj36XjBSUr9DNPL1XffHu8gXQYm0K44gMY4aBv
	DmOvSjWcd8CnsiinofaCcyRPB5XB07U7Q/PSbAUK5YnJqIlbiUdX6b32xviaiknF5UJW
	738oEuIr3XeOrSpvLn8nkSL0T93twToWaww46Qaaj9Gvw64fkVMnN57ULzpgRWDv66jT
	RwFA==
MIME-Version: 1.0
X-Received: by 10.152.2.42 with SMTP id 10mr1048001lar.77.1371211381115; Fri,
	14 Jun 2013 05:03:01 -0700 (PDT)
Received: by 10.114.62.81 with HTTP; Fri, 14 Jun 2013 05:03:01 -0700 (PDT)
In-Reply-To: <3C23B351BD1CA0429DAA8ED382F16A1F02C48183AF@indiambx01.corp.adobe.com>
References: <3C23B351BD1CA0429DAA8ED382F16A1F02C48183AF@indiambx01.corp.adobe.com>
Date: Fri, 14 Jun 2013 14:03:01 +0200
Message-ID: <CA+NZCsQN7oJH49L3EjxsLp=NvQfzqH262acnGqiobHWMBm77UQ@mail.gmail.com>
From: "Joris Van Damme (AWare Systems)" <info@awaresystems.be>
To: Sunanda Chowdhary <chowdhar@adobe.com>
Cc: Tiff List <tiff@lists.maptools.org>
Subject: Re: [Tiff] : Tiff Decoder in case tiff color space is CIE LAB
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

Sunanda,

> So
> according to description about the tags, if samples per pixel = 3 then color
> space is set to RGB.

Huh? Where does it say that? If SamplesPerPixel equals 3, that means
only that you've three samples in a pixel, nothing else is implied.

Samples per pixel is useful in determining colorspace, sometimes. For
example, combined with a LAB Photometric, SamplesPerPixel equal to 1
indicates that the image stores L, whilst SamplesPerPixel equal to 3
indicates that time image stores LAB.

Well, not quite, because I'm not taking ExtraSamples into account. The
count of this tag plays a significant role, too. For instance, you
could have a LAB Photometric, SamplesPerPixel could be 4, and
ExtraSamples could have a count of 1. The image then stores LAB, and
one additional channel. Or you could have a LAB Photometric,
SamplesPerPixel could be 40, and ExtraSamples could have a count of
39. The image then stores L, and 39 additional channels.

But most of the time, the colorspace is exclusively determined by the
Photometric tag, as with most colorspaces you don't have this
ambiguity of the same Photometric being used for what is essentially
more or less two different colorspaces. So, in most cases,
SamplesPerPixel is more or less useful 'doublechecking consistency in
the TIFF reader interpretation of the image'. For example, if
Photometric is RGB, then the reader code could double-check if
SamplesPerPixel subtracted by the count of ExtraSamples equals 3, and
if it doesn't it'll take some extra robust response or more likely an
error report.

In conclusion, Photometric is how you communicate the colorspace
specification, not SamplesPerPixel.


Best regards,

Joris Van Damme
AWare Systems
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
