Return-Path: <tiff-bounces@remotesensing.org>
Received: from inav002.isp.belgacom.be (inav002.isp.belgacom.be [195.238.3.145])
        by mailst035.isp.belgacom.be (8.12.11/8.12.11/Skynet-MAILSTORE-2.14) with ESMTP id i9SC41pn012024
        for <joris.at.lebbeke@skynet.be>; Thu, 28 Oct 2004 14:04:01 +0200
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from inas001.isp.belgacom.be (localhost [127.0.0.1])
        by inav002.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AV-3.00) with ESMTP id i9SC3suF002311
        for <joris.at.lebbeke@skynet.be>; Thu, 28 Oct 2004 14:03:54 +0200
        (envelope-from <tiff-bounces@remotesensing.org>)
Received: from inmx014.isp.belgacom.be (inmx014.isp.belgacom.be [195.238.2.217])
        by inas001.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AS-2.03) with ESMTP id i9SC3dNX012768
        for <joris.at.lebbeke@skynet.be>; Thu, 28 Oct 2004 14:03:44 +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 inmx014.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id i9SC3YsZ000535
        for <joris.at.lebbeke@skynet.be>; Thu, 28 Oct 2004 14:03:36 +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 A0B3A41C23A; Thu, 28 Oct 2004 08:03:23 -0400 (EDT)
X-Original-To: tiff@remotesensing.org
Delivered-To: tiff@remotesensing.org
Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.192])
	by xserve.flids.com (Postfix) with ESMTP id 7784041C217
	for <tiff@remotesensing.org>; Thu, 28 Oct 2004 08:03:20 -0400 (EDT)
Received: by wproxy.gmail.com with SMTP id 58so532138wri
	for <tiff@remotesensing.org>; Thu, 28 Oct 2004 05:03:17 -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:mime-version:content-type:content-transfer-encoding;
	b=pDSGgujUEQSqsiGgf+f9AMt5RBdUy8d9qEEfXlZslOLBnJo8RIwaq5yBOkftTvLETDWA+oVmPQxDs8ZbFSxkfi+GqOy4RINpzJH2keB4/ah1OVnOjgibze3b5uQIiXTMVlX1p2p1sH1r/1+Df+k6K3e+p+Z+OHusVuDTE6amc9E=
Received: by 10.38.13.79 with SMTP id 79mr1321554rnm;
	Thu, 28 Oct 2004 05:03:17 -0700 (PDT)
Received: by 10.38.86.41 with HTTP; Thu, 28 Oct 2004 05:03:17 -0700 (PDT)
Message-ID: <b35303704102805032d56f188@mail.gmail.com>
Date: Thu, 28 Oct 2004 17:33:17 +0530
From: Sachin Garg <schngrg@gmail.com>
To: tiff@remotesensing.org
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Subject: [Tiff] why does tiffcp::cpSeparateBufToContigBuf takes
	BYTES_per_sample as parameter?
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: 22b6b22125b51c66f150b031997a89d3

I am a bit confused about why cpSeparateBufToContigBuf (and
cpContigBufToSeparateBuf) take bytes_per_sample as parameter instead
of a bits_per_sample.

#. Is it because libtiff doesnt supports tiffs for which
bits_per_sample is not a mulitple of 8?

#. Or is it because tools/tiffcp doesnt supports images for which
bits_per_sample is not a mulitple of 8?

#. If its not either of the above two cases, then how are these
routines (cpSeparateBufToContigBuf and cpContigBufToSeparateBuf) able
to handle such images (for which bits_per_sample is not a mulitple of
8) ?

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)

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