Return-Path: <tiff-admin@remotesensing.org>
Received: from cee.skynet.be (cee.skynet.be [195.238.2.101])
        by twentyeight.skynet.be (8.12.9/8.12.9/Skynet-MAILSTORE-2.14) with ESMTP id hBN97hoN003003
        for <joris.at.lebbeke@skynet.be>; Tue, 23 Dec 2003 10:07:43 +0100
        (envelope-from <tiff-admin@remotesensing.org>)
Received: from yoda.imagelinks.com ([208.24.120.42])
        by cee.skynet.be (8.12.9/8.12.9/Skynet-IN-2.32) with ESMTP id hBN95w21023718
        for <joris.at.lebbeke@skynet.be>; Tue, 23 Dec 2003 10:06:00 +0100
        (envelope-from <tiff-admin@remotesensing.org>)
Received: from yoda.imagelinks.com (localhost.localdomain [127.0.0.1])
	by yoda.imagelinks.com (8.11.6/8.11.2) with ESMTP id hBN95El06940;
	Tue, 23 Dec 2003 04:05:14 -0500
Received: from ahk.pu.ru (ahk.pu.ru [193.124.85.198])
	by yoda.imagelinks.com (8.11.6/8.11.2) with ESMTP id hBN946l06920
	for <tiff@remotesensing.org>; Tue, 23 Dec 2003 04:04:07 -0500
Received: from wg.pu.ru (wg.pu.ru [193.124.85.219])
	by ahk.pu.ru (8.12.9p2/8.12.9) with ESMTP id hBN945E7096167
	for <tiff@remotesensing.org>; Tue, 23 Dec 2003 12:04:05 +0300 (MSK)
	(envelope-from dron@ak4719.spb.edu)
Received: (from uucp@localhost)
	by wg.pu.ru (8.9.1a/8.9.1) with UUCP id JAA23528
	for tiff@remotesensing.org; Tue, 23 Dec 2003 09:04:05 GMT
Received: from ak4719.spb.edu (localhost [127.0.0.1])
	by ak4719.spb.edu (8.12.1/8.12.1/Debian -5) with ESMTP id hBN8WsnK004518
	for <tiff@remotesensing.org>; Tue, 23 Dec 2003 11:32:55 +0300
Received: (from dron@localhost)
	by ak4719.spb.edu (8.12.1/8.12.1/Debian -5) id hBN8WsLe004515
	for tiff@remotesensing.org; Tue, 23 Dec 2003 11:32:54 +0300
From: Andrey Kiselev <dron@ak4719.spb.edu>
To: "Tiff@Remotesensing.Org" <tiff@remotesensing.org>
Subject: Re: [Tiff] undefined reference to `TIFFDataWidth'
Message-ID: <20031223083254.GA3185@ak4719.spb.edu>
Mail-Followup-To: "Tiff@Remotesensing.Org" <tiff@remotesensing.org>
References: <MJEBIBGMCDKIGEHPDECCMEMLCFAA.pushkar@erc.msstate.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <MJEBIBGMCDKIGEHPDECCMEMLCFAA.pushkar@erc.msstate.edu>
X-GnuPG-Key: http://www.srces.spb.org/dron/export.home.key
X-Face: "t+se9s~+y~[XUH]L|pmeO3Pt/Q@DNv**S,d@_1-C=}/,c%<3Qp]eu!ok<"2lYJm$!9qVcg
 F?7o*L;|$`6|Q|>Rt-cU%2_y@6tQ|`!Li}TsvZvEKx;>fuY=fc(=sX^`7Wmw8%SsR`AvM$a;0U/eN\
 P?B\FTyqD,0np$U2!*'z_4D,VPlFf?bN0&zYf"zF0s!7Tl7?$we)xD0@lL>[h|8bhys0i.g|zLnu@C
 Ti@d]i=[!:j1CB\5/TF[m]`lfHfaqSN[0qn@T3zeosV/[LAss{@p_?],x*j8P_9t[}uHD^X-;j~\M!
 gyTly;fj`}&Y~i{<#bN.#QmkE}#T`dxP.I1\.)_MEN{@#W
User-Agent: Mutt/1.5.3i
Sender: tiff-admin@remotesensing.org
Errors-To: tiff-admin@remotesensing.org
X-BeenThere: tiff@remotesensing.org
X-Mailman-Version: 2.0.11
Precedence: bulk
List-Help: <mailto:tiff-request@remotesensing.org?subject=help>
List-Post: <mailto:tiff@remotesensing.org>
List-Subscribe: <http://remotesensing.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=subscribe>
List-Id: TIFF and libtiff discussion <tiff.remotesensing.org>
List-Unsubscribe: <http://remotesensing.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@remotesensing.org?subject=unsubscribe>
List-Archive: <http://remotesensing.org/pipermail/tiff/>
Date: Tue, 23 Dec 2003 11:32:54 +0300
X-UIDL: 8c588cd9d7d7a2af6338c48dad2f15ea

On Mon, Dec 22, 2003 at 05:59:25PM -0600, Pushkar Pradhan wrote:
> I've another question too, I'm calculating the bitspersample tag from
> sampleformat tag, will this always give the correct result: (dType is
> TIFFDataType) (wtags is just a struct containing all the tags I want).
>   wtags.sampleFormat = dType;
>   wtags.bitsPerSample = TIFFDataWidth(dType)*8;

Yes, this should work right, but it is better to check value
returned by the TIFFDataWidth() against 0 before using. It is possible
you can get broken or esoterical TIFF with unknown sample type, in this
case 0 will be returned.

						Andrey

-- 
Andrey V. Kiselev
Home phone:  +7 812 5274898  ICQ# 26871517
_______________________________________________
Tiff mailing list
Tiff@remotesensing.org
http://remotesensing.org/mailman/listinfo/tiff
