Return-Path: <tiff-admin@remotesensing.org>
Received: from tee.skynet.be (tee.skynet.be [195.238.3.4])
        by twentyeight.skynet.be (8.12.9/8.12.9/Skynet-MAILSTORE-2.14) with ESMTP id hBVBll0m001062
        for <joris.at.lebbeke@skynet.be>; Wed, 31 Dec 2003 12:47:47 +0100
        (envelope-from <tiff-admin@remotesensing.org>)
Received: from yoda.imagelinks.com ([208.24.120.42])
        by tee.skynet.be (8.12.9/8.12.9/Skynet-IN-2.32) with ESMTP id hBVBkmlJ031065
        for <joris.at.lebbeke@skynet.be>; Wed, 31 Dec 2003 12:46:49 +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 hBVBjRl24266;
	Wed, 31 Dec 2003 06:45:27 -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 hBVBinl24226
	for <tiff@remotesensing.org>; Wed, 31 Dec 2003 06:44:50 -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 hBVBimE7052677
	for <tiff@remotesensing.org>; Wed, 31 Dec 2003 14:44:48 +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 LAA26150
	for tiff@remotesensing.org; Wed, 31 Dec 2003 11:44:48 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 hBVBe1wm027869
	for <tiff@remotesensing.org>; Wed, 31 Dec 2003 14:40:01 +0300
Received: (from dron@localhost)
	by ak4719.spb.edu (8.12.1/8.12.1/Debian -5) id hBVBe1V4027866
	for tiff@remotesensing.org; Wed, 31 Dec 2003 14:40:01 +0300
From: Andrey Kiselev <dron@ak4719.spb.edu>
To: "Tiff@Remotesensing.Org" <tiff@remotesensing.org>
Subject: Re: [Tiff] problems with custom TIFF
Message-ID: <20031231114000.GA26997@ak4719.spb.edu>
Mail-Followup-To: "Tiff@Remotesensing.Org" <tiff@remotesensing.org>
References: <20031226093640.GA15398@ak4719.spb.edu> <MJEBIBGMCDKIGEHPDECCEEPBCFAA.pushkar@erc.msstate.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <MJEBIBGMCDKIGEHPDECCEEPBCFAA.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: Wed, 31 Dec 2003 14:40:00 +0300
X-UIDL: dd311394eb1b5dae61286438844d92f9

On Mon, Dec 29, 2003 at 06:47:57PM -0600, Pushkar Pradhan wrote:
> > >  size = TIFFReadEncodedStrip(tif, strip, bufRGB, (tsize_t)-1);
> > Why do you using -1 here? It should be a size of bufRGB in bytes.
> I read the libtiff tutorial which suggests using (tsize_t)-1) as it will
> read in the whole tile/strip by default. It seems to work okay for me.

Oh, it seems to be missed in the manual pages... Fixed.

> I'm now writing out the extrasamples tag but still IMAGINE can't open
> the file for viewing.
> This is how I get/set in the tags is this correct?
>  TIFFGetField(tif, TIFFTAG_EXTRASAMPLES, &tags->extra, &tags->extraTypes);
>  TIFFSetField(wtif, TIFFTAG_EXTRASAMPLES, wtags.extra, wtags.extraTypes);
> 
>  Where tag members are:
>    uint16 extra;
>    uint16 *extraTypes;

I think you don't need to do something with extrasamples in output
image. But don't forget to set TIFFTAG_SAMPLEFORMAT correctly:

 TIFFSetField(out, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_IEEEFP);

						Andrey

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