Return-Path: <tiff-bounces@lists.maptools.org>
Delivered-To: info@awaresystems.be
Received: (qmail 4286 invoked from network); 18 Nov 2008 09:31:01 -0000
Received: from cliffy.telenet-ops.be ([195.130.136.2])
          (envelope-sender <tiff-bounces@lists.maptools.org>)
          by angelia.telenet-ops.be (qmail-ldap-1.03) with SMTP
          for <info@awaresystems.be>; 18 Nov 2008 09:31:01 -0000
Received: from mindy.telenet-ops.be (mindy.telenet-ops.be [195.130.136.8])
	by cliffy.telenet-ops.be (8.13.1/8.13.1) with ESMTP id mAI9V1Lo008990
	for <info@awaresystems.be>; Tue, 18 Nov 2008 10:31:01 +0100
Received: from localhost (localhost.localdomain [127.0.0.1])
	by mindy.telenet-ops.be (Postfix) with SMTP id AEA866000C
	for <info@awaresystems.be>; Tue, 18 Nov 2008 10:31:01 +0100 (CET)
Received: from penia.telenet-ops.be (penia.telenet-ops.be [195.130.132.39])
	by mindy.telenet-ops.be (Postfix) with ESMTP id A5FFA6000B
	for <info@awaresystems.be>; Tue, 18 Nov 2008 10:31:01 +0100 (CET)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153])
	by penia.telenet-ops.be (Postfix) with ESMTP id 441F733E604
	for <info@awaresystems.be>; Tue, 18 Nov 2008 10:31:01 +0100 (CET)
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 mAI9SbhA009334;
	Tue, 18 Nov 2008 04:29:36 -0500
Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.233])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id mAI9SW2i009326
	for <tiff@lists.maptools.org>; Tue, 18 Nov 2008 04:28:33 -0500
Received: by rv-out-0506.google.com with SMTP id f6so3772662rvb.9
	for <tiff@lists.maptools.org>; Tue, 18 Nov 2008 01:28:30 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:message-id:date:from:to
	:subject:cc:in-reply-to:mime-version:content-type
	:content-transfer-encoding:content-disposition:references;
	bh=BoLTtIMcXkO+vKV8KzGBMwbSdeQiEMlN51gJDMl1+Is=;
	b=agWb9ZmHnhMg0qQfkB8GUWuIYzg1E6/3bIk8hMYzqhxDJGwtXVUR02eTwGEAaudzVL
	mLOTn5y4ZOMDXqrOqyKO5JVoBeBeg80uxqaXyIXACVsZZJfAp4BFFGntwC5U4+knbw1J
	8uIfvUarE9pXClMrUjQpFLOxRn2pBRC4H5Sb8=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=message-id:date:from:to:subject:cc:in-reply-to:mime-version
	:content-type:content-transfer-encoding:content-disposition
	:references;
	b=VNO0RKM4Yg+qtfZtrlrMisfdTsv5eNbRDQ2K+dSaP4acA10Ssoa/g6Z64OAFR2J/NT
	xDq1TKdwvmu7V9AxC7XVJsEPCPLbz3FHW1RGNTSkj0LxGYIuriTx7eBEapGOE3UKQrQ0
	xz3FDBXO1qEmXvO+1WYIs07sPLBtipjhnbz8o=
Received: by 10.142.52.9 with SMTP id z9mr280927wfz.233.1227000510168;
	Tue, 18 Nov 2008 01:28:30 -0800 (PST)
Received: by 10.143.157.17 with HTTP; Tue, 18 Nov 2008 01:28:30 -0800 (PST)
Message-ID: <522c6460811180128h67272838vee12199f9423e398@mail.gmail.com>
Date: Tue, 18 Nov 2008 09:28:30 +0000
From: jcupitt@gmail.com
To: "Beck, Tucker A" <Tucker.Beck@pnl.gov>
Subject: Re: [Tiff] Creating a tiled tiff from scratch (essentially)
In-Reply-To: <9EA84B4DE79CD74F89F814624913B70506AF4143@EMAIL01.pnl.gov>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <9EA84B4DE79CD74F89F814624913B70506AF4143@EMAIL01.pnl.gov>
Cc: tiff@lists.maptools.org
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/mailman/private/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-SpamCatcher-Score: 50 [XX]

Hi,

2008/11/18 Beck, Tucker A <Tucker.Beck@pnl.gov>:
> When I create the tiff file, I would like to set up each directory when I create the file.  I do not want to store any image data in them at creation, I just want them to be ready for writing data when it needs to be done.

I have a slightly similar problem: one of the output formats for my
image processing system is tiled, pyramidal, jpeg tiff.

The best solution I found was to write the file in two stages. I make
a pass over the full resolution image and generate all the layers of
the pyramid as separate tiled jpeg tiff files. I then create the final
output image, copy the pyramid layers in one by one, attach any extra
data (ICC profiles etc.) then finally delete the temporary files.

It seems fast enough, and it works with any version of libtiff. The is
an extra jpeg decompress / recompress when you copy the tiled images
which it would be nice to avoid, but I've not managed to work that one
out.

LGPL source here, if you're curious:

  http://vips.svn.sourceforge.net/viewvc/vips/vips7/trunk/libsrc/format/im_vips2tiff.c?view=markup

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