Return-Path: <tiff-bounces@lists.maptools.org>
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged))
        by inmx012.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id j6PFbXvQ003633
        for <joris.at.lebbeke@skynet.be>; Mon, 25 Jul 2005 17:37:34 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id j6PFcV95001717;
	Mon, 25 Jul 2005 11:38:41 -0400
Received: from outmx025.isp.belgacom.be (outmx025.isp.belgacom.be
	[195.238.2.49])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id j6PFcSrX001714
	for <tiff@lists.maptools.org>; Mon, 25 Jul 2005 11:38:28 -0400
Received: from outmx025.isp.belgacom.be (localhost [127.0.0.1])
	by outmx025.isp.belgacom.be (8.12.11/8.12.11/Skynet-OUT-2.22) with
	ESMTP id j6PFXJAS001548
	for <tiff@lists.maptools.org>; Mon, 25 Jul 2005 17:33:19 +0200
	(envelope-from <joris.at.lebbeke@skynet.be>)
Received: from dfgrrxsknr4e (34-147.246.81.adsl.skynet.be [81.246.147.34])
	by outmx025.isp.belgacom.be (8.12.11/8.12.11/Skynet-OUT-2.22) with SMTP
	id j6PFXDnH001494; Mon, 25 Jul 2005 17:33:13 +0200
	(envelope-from <joris.at.lebbeke@skynet.be>)
Message-ID: <000c01c5912e$37239890$2293f651@dfgrrxsknr4e>
From: "Joris" <joris.at.lebbeke@skynet.be>
To: "Anmol Misra" <ajn@andrew.cmu.edu>, <tiff@lists.maptools.org>
References: <42E2F17F.8090408@andrew.cmu.edu>
Subject: Re: [Tiff] RE: Van Damme
Date: Mon, 25 Jul 2005 17:33:24 +0200
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
Cc: 
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/pipermail/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-UIDL: 000000000023ceae.00000948
X-MSP-STORE: Mon, 25 Jul 2005 17:37:40 +0200
Status:   

> I am actually trying to join two single page tiff files to multiple tiff
> files.
> So I need to play around with the offsets of the second files and one of
> the problems
> that I am facing was to decide whether 4 bit value is Value or Offset to
> the value.

If joining tiff pages is your goal, then you've got some additional trouble to
consider.

- Some tags need to be copied in order for your destination file to make sense.
ImageWidth tag is a perfect example.
- Some tags need to do additional very specific processing. TileOffsets and
StripOffsets tags.
- Some tags, you must *not* copy for reasons of their actual meaning. PageNumber
is a perfect example.
- In general, blind copy of unknown tags is downright dangerous. A datatype of
long can mean just that, a 32bit unsigned value, but it is also a not very
recommended way to point to a child IFD. It's very hard to know which of these
two it is used for. This means that you could be copying a pointer to a child
IFD as if it were a long value. Next, an application that actually knows that
particular tag might come along, and might expect that sort of particular child
IFD to be present at that particular offset. But it isn't. It is pointed to
random other data, and depending on whether or not it is very robust, it might
behave in unexpected ways.
- Even though the TIFF spec forbids pointers to locations outside the tag data,
in any tag data block, there are known offenses. This too, leads to trouble.

I recommend you also search the mailing list archive for more information on
this. The archive search is over at:

 http://www.awaresystems.be/imaging/tiff/tml.html.

If I remember correctly, there is a LibTiff tool which does this TIFF concat. It
is very restrictive about the tags it copies. I'm not the expert on LibTiff, but
there's a useful page on LibTiff tools here:

http://www.remotesensing.org/libtiff/tools.html

> About LibTiff, can one use it in the programs ? Are there any license
> restrictions to it?

As far as I know, the license is not restrictive at all. Basically, you can use
it in any applications, including commercial ones.


Joris Van Damme
info@awaresystems.be
http://www.awaresystems.be/
Download your free TIFF tag viewer for windows here:
http://www.awaresystems.be/imaging/tiff/astifftagviewer.html

_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
