Return-Path: <tiff-bounces@remotesensing.org>
Received: from inmx015.isp.belgacom.be (inmx015.isp.belgacom.be [195.238.2.218])
        by mailst035.isp.belgacom.be (8.12.11/8.12.11/Skynet-MAILSTORE-2.14) with ESMTP id j2AAmTBo018551
        for <joris.at.lebbeke@skynet.be>; Thu, 10 Mar 2005 11:48:29 +0100
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from xserve.flids.com (adsl-065-083-169-202.sip.mco.bellsouth.net [65.83.169.202])
        by inmx015.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id j2AAmFOf008362
        for <joris.at.lebbeke@skynet.be>; Thu, 10 Mar 2005 11:48:16 +0100
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from adsl-065-083-169-202.sip.mco.bellsouth.net (localhost [127.0.0.1])
	by xserve.flids.com (Postfix) with ESMTP
	id 3D79911166F6; Thu, 10 Mar 2005 05:48:00 -0500 (EST)
X-Original-To: tiff@remotesensing.org
Delivered-To: tiff@remotesensing.org
Received: from ms-dienst.rz.rwth-aachen.de (ms-2.rz.rwth-aachen.de
	[134.130.3.131])
	by xserve.flids.com (Postfix) with ESMTP id CE9D911166D3
	for <tiff@remotesensing.org>; Thu, 10 Mar 2005 05:47:57 -0500 (EST)
Received: from r220-1 (r220-1.rz.RWTH-Aachen.DE [134.130.3.31])
	by ms-dienst.rz.rwth-aachen.de
	(iPlanet Messaging Server 5.2 HotFix 1.12 (built Feb 13 2003))
	with ESMTP id <0ID40025JTX8VK@ms-dienst.rz.rwth-aachen.de> for
	tiff@remotesensing.org; Thu, 10 Mar 2005 11:46:21 +0100 (MET)
Received: from relay.rwth-aachen.de ([134.130.3.1])
	by r220-1 (MailMonitor for SMTP v1.2.2 ) ; Thu,
	10 Mar 2005 11:46:20 +0100 (MET)
Received: from mail.hilton.rwth-aachen.de
	(mail.hilton.RWTH-Aachen.DE [134.130.55.29])
	by relay.rwth-aachen.de (8.13.0/8.13.0/1) with ESMTP id
	j2AAkJ68026175	for
	<tiff@remotesensing.org>; Thu, 10 Mar 2005 11:46:19 +0100 (MET)
Received: from [134.130.55.99] (ip-099.hilton.RWTH-Aachen.DE [134.130.55.99])
	by mail.hilton.rwth-aachen.de (Postfix) with ESMTP id 832526BCA2	for
	<tiff@remotesensing.org>; Thu, 10 Mar 2005 11:46:14 +0100 (CET)
Date: Thu, 10 Mar 2005 11:46:14 +0100
From: Daniel Sievers <sievers@hilton.rwth-aachen.de>
To: tiff@remotesensing.org
Message-id: <42302576.4080306@hilton.rwth-aachen.de>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
X-Accept-Language: en-us, en
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Enigmail-Version: 0.89.6.0
X-Enigmail-Supports: pgp-inline, pgp-mime
Subject: [Tiff] libtiff: Tiff Tag EXTRASAMPLES and TIFFRGBAImage
X-BeenThere: tiff@remotesensing.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: TIFF and libtiff discussion  <tiff.remotesensing.org>
List-Unsubscribe: <http://xserve.flids.com/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=unsubscribe>
List-Archive: <http://xserve.flids.com/pipermail/tiff>
List-Post: <mailto:tiff@remotesensing.org>
List-Help: <mailto:tiff-request@remotesensing.org?subject=help>
List-Subscribe: <http://xserve.flids.com/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=subscribe>
Sender: tiff-bounces@remotesensing.org
Errors-To: tiff-bounces@remotesensing.org
X-UIDL: c64a6d42ef1826af02fc3b46e950dbba

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I have two related libtiff concerns:

1) Reading TIFF images with the nice TIFFReadRGBAImage() routine

(version of libtiff used is 3.7.1 )

in line 250 of tif_getimage.c it says:
"if (extrasamples > 1)"

That way img->alpha is always left set to 0 for images with
extrasamples==1 (which I assume is the common case). Then alpha values
from the image are not used, but initialized to 0xff.

Shouldn't it say "if (extrasamples > 0)"?

~From what I can see with common code samples and RGB images, these have
a value of extrasamples==1, if they contain an alpha channel.


2) About using the get and set routines for the EXTRASAMPLES flag

The official TIFF homepage lists
http://www.awaresystems.be/imaging/tiff/faq.html as a reference for TIFF
tags. On that page EXTRASAMPLES is defined differently from how it is used.
There it says for the baseline EXTRASAMPLES tag, that this tag consists
of N values, where N=samplesPerPixel-colorSamples.
How it is really used is that it returns N+1 values. The first value
returns the number of extrasamples, while the remaining values work as
documented.
Or do tags with more than one value generally work this way?
Is there any clear documentation on this somewhere?


I would appreciate comments on this, especially the first matter.
Thanks!

- -Daniel

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCMCV2JuyuGD8LzMYRAih8AJ0Vq5vTPIL56tX1Q65jbZX8G8cFOQCfYfc/
iBRZQs/B8xiFzo2sm7EK/7M=
=3ky9
-----END PGP SIGNATURE-----

_______________________________________________
Tiff mailing list
Tiff@remotesensing.org
http://xserve.flids.com/mailman/listinfo/tiff
