Return-Path: <tiff-admin@remotesensing.org>
Received: from inmx009.isp.belgacom.be (inmx009.isp.belgacom.be [195.238.3.146])
        by six.skynet.be (8.12.9/8.12.9/Skynet-MAILSTORE-2.14) with ESMTP id i23BLCON023308
        for <joris.at.lebbeke@skynet.be>; Wed, 3 Mar 2004 12:21:12 +0100
        (envelope-from <tiff-admin@remotesensing.org>)
Received: from yoda.imagelinks.com ([208.24.120.42])
        by inmx009.isp.belgacom.be (8.12.9/8.12.9/Skynet-IN-2.32) with ESMTP id i23BKxJS023391
        for <joris.at.lebbeke@skynet.be>; Wed, 3 Mar 2004 12:21: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 i23BIKl01483;
	Wed, 3 Mar 2004 06:18:20 -0500
Received: from castor.zylab.nl (zyfire.irt.nl [193.67.146.3] (may be forged))
	by yoda.imagelinks.com (8.11.6/8.11.2) with ESMTP id i23BH6l01454
	for <tiff@remotesensing.org>; Wed, 3 Mar 2004 06:17:11 -0500
Received: from zyback2.zylab.nl (unknown [192.168.1.2])
	by castor.zylab.nl (Postfix) with ESMTP id D81CA492C8
	for <tiff@remotesensing.org>; Wed,  3 Mar 2004 11:52:00 +0100 (CET)
Received: from zymail.zylab.nl ([192.168.1.10]) by zyback2.zylab.nl with Microsoft SMTPSVC(5.0.2195.5329);
	 Wed, 3 Mar 2004 12:16:11 +0100
X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0
content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Subject: Re: [Tiff] Hello world
Message-ID: <44E68E8A7590D411862200508B9AFC2201AFF353@zymail.zylab.nl>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: [Tiff] Hello world
Thread-Index: AcQAq7HmIfuNlg+HQN2sO2MuEr3tOAAYuLvw
From: "Gerben Vos" <gerben@ZyLAB.COM>
To: <tiff@remotesensing.org>
Cc: <xevit@isildur.homelinux.net>
X-OriginalArrivalTime: 03 Mar 2004 11:16:11.0296 (UTC) FILETIME=[EEEEFA00:01C40110]
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by yoda.imagelinks.com id i23BH6l01454
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, 3 Mar 2004 12:16:08 +0100
X-UIDL: d998e3559c1452ef4dfbb51515c064c9

xevit wrote:

> My problem is that when I'm working on a big TIFF file ( tile 
> based ) I want to read and write simultaneous to the same file,
> to change small portions of my bigImage.

I have never tried it, but I guess it should be possible to open the TIFF as a normal file (using open() on Unix or CreateFile() on Win32; see the code in tif_unix.c, tif_win32.c, or the appropriate file for your OS), and then pass the returned file descriptor to TIFFFdOpen(). Then you can use libtiff to read the strip offsets and sizes, and use the normal file handle to lseek() (or SetFilePointer() or whatever) to the correct offset within the file and overwrite the data there. I'm not sure whether it would be wise to use any of libtiff's write functions.

Of course, this will all only work when the TIFF is uncompressed! Otherwise, the (compressed) size of the data could change, and all bets are off.

It would be interesting to hear from anyone who has ever tried this kind of thing with libtiff.

					Gerben Vos.
_______________________________________________
Tiff mailing list
Tiff@remotesensing.org
http://remotesensing.org/mailman/listinfo/tiff
