Return-Path: <tiff-bounces@remotesensing.org>
Received: from inav006.isp.belgacom.be (inav006.isp.belgacom.be [195.238.2.75])
        by mailst035.isp.belgacom.be (8.12.11/8.12.11/Skynet-MAILSTORE-2.14) with ESMTP id i9SFJvq9012790
        for <joris.at.lebbeke@skynet.be>; Thu, 28 Oct 2004 17:19:57 +0200
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from inas004.isp.belgacom.be (localhost [127.0.0.1])
        by inav006.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AV-3.00) with ESMTP id i9SFJodC016086
        for <joris.at.lebbeke@skynet.be>; Thu, 28 Oct 2004 17:19:50 +0200
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from inmx007.isp.belgacom.be (inmx007.isp.belgacom.be [195.238.3.89])
        by inas004.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AS-2.03) with ESMTP id i9SFJdeB023696
        for <joris.at.lebbeke@skynet.be>; Thu, 28 Oct 2004 17:19:42 +0200
        (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 inmx007.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id i9SFJTj4002872
        for <joris.at.lebbeke@skynet.be>; Thu, 28 Oct 2004 17:19:32 +0200
        (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 8509541CBAD; Thu, 28 Oct 2004 11:19:09 -0400 (EDT)
X-Original-To: tiff@remotesensing.org
Delivered-To: tiff@remotesensing.org
Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.199])
	by xserve.flids.com (Postfix) with ESMTP id 0B79441CB8A
	for <tiff@remotesensing.org>; Thu, 28 Oct 2004 11:19:07 -0400 (EDT)
Received: by wproxy.gmail.com with SMTP id 58so561075wri
	for <tiff@remotesensing.org>; Thu, 28 Oct 2004 08:18:41 -0700 (PDT)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com;
	h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references;
	b=Rd4+1+P08TqWPfQpmuFUh0vMBPbQRcv3d1qNuwr63AI7G+k1lW28NpUx2CImHzvq2LLC4UknMvr9MZqBloxD1UUO1fPyCKEpRsnKlNei43VgQuW6VFFk1YdPtun+lDSEqOsgLhYcOj/aNwfBJTOAonzUjuDp8je+3Y8J7UAGosE=
Received: by 10.38.181.44 with SMTP id d44mr1398846rnf;
	Thu, 28 Oct 2004 08:18:41 -0700 (PDT)
Received: by 10.38.86.41 with HTTP; Thu, 28 Oct 2004 08:18:41 -0700 (PDT)
Message-ID: <b35303704102808187677935@mail.gmail.com>
Date: Thu, 28 Oct 2004 20:48:41 +0530
From: Sachin Garg <schngrg@gmail.com>
To: tiff@remotesensing.org
Subject: Re: [Tiff] why does tiffcp::cpSeparateBufToContigBuf takes
	BYTES_per_sample as parameter?
In-Reply-To: <Pine.SOC.4.60.0410280901380.8908@blade.simplesystems.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
References: <b35303704102805032d56f188@mail.gmail.com>
	<Pine.SOC.4.60.0410280901380.8908@blade.simplesystems.org>
X-BeenThere: tiff@remotesensing.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: Sachin Garg <schngrg@gmail.com>
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: 3ce310948b88d504167a8ef506a26912

On Thu, 28 Oct 2004 09:05:36 -0500 (CDT), Bob Friesenhahn
<bfriesen@simple.dallas.tx.us> wrote:
> On Thu, 28 Oct 2004, Sachin Garg wrote:
> >
> > Also, is it that in a tiff, bits_per_sample can take only some valid
> > values, or can any value be assigned/expected for this tag? (4, 8, 16,
> > 24, 32 seem to be popular ones but are these the only valid values, or
> > can I expect other values like 3, 6, 19 etc... too)
> 
> The bits_per_sample value can be almost any value. I have used libtiff
> with values ranging from 1 to 32 without problem.  For example, 7 is a
> legitimate value.  Most software only reads and writes 1 and powers of
> two, but TIFF files with bits_per_sample of 10 or 12 are in common use
> for some trades (e.g. to support medical/scientific CCD cameras).

Thanks Bob, this means that I should be expecting any bit-depth in a tiff image.

But I am confused (as mentioned in my original post) how tiffcp
routines (cpSeparateBufToContigBuf and cpContigBufToSeparateBuf)
handle all bit-depths, they seem to be byte oriented.

I want to use these routines on the buffers returned by
readSeparateTilesIntoBuffer (and other similar tiffcp routines), will
the above mentioned routines work on these buffers for all-possible
bit depths?

-- 
Sachin Garg [India]
http://www.geocities.com/schngrg
_______________________________________________
Tiff mailing list
Tiff@remotesensing.org
http://xserve.flids.com/mailman/listinfo/tiff
