Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
X-Original-To: filtered@awaresystems.be
Delivered-To: filtered@awaresystems.be
Received: from mx-i.one.com (mx-i.one.com [91.198.169.56])
	by mail9.b-one.net (Postfix) with ESMTP id 65300401F08
	for <filtered@awaresystems.be>; Wed,  1 Feb 2012 20:03:59 +0100 (CET)
X-Virus-Scanned: by one.com
Received-SPF: pass (mx-i: domain of awaresystems.be+caf_=filtered=awaresystems.be@gmail.com designates 209.85.210.41 as permitted sender)
X-Greylist: whitelisted by SQLgrey-1.8.0-rc2
Received: from mail-pz0-f41.google.com (mail-pz0-f41.google.com [209.85.210.41])
	by mx-i.one.com (Postfix) with ESMTP id A3606266D75F
	for <filtered@awaresystems.be>; Wed,  1 Feb 2012 19:03:57 +0000 (UTC)
Received: by dadv6 with SMTP id v6so1327475dad.0
        for <filtered@awaresystems.be>; Wed, 01 Feb 2012 11:03:57 -0800 (PST)
Received: by 10.68.208.196 with SMTP id mg4mr61194155pbc.108.1328123037086;
        Wed, 01 Feb 2012 11:03:57 -0800 (PST)
X-Forwarded-To: filtered@awaresystems.be
X-Forwarded-For: awaresystems.be@gmail.com filtered@awaresystems.be
Delivered-To: awaresystems.be@gmail.com
Received: by 10.142.51.2 with SMTP id y2cs292971wfy;
        Wed, 1 Feb 2012 11:03:56 -0800 (PST)
Received: by 10.68.216.133 with SMTP id oq5mr21854539pbc.110.1328123035861;
        Wed, 01 Feb 2012 11:03:55 -0800 (PST)
Received-SPF: softfail (google.com: best guess record for domain of transitioning tiff-bounces@lists.maptools.org does not designate 91.198.169.58 as permitted sender) client-ip=91.198.169.58;
Received: by 10.131.97.17 with POP3 id z17mf709122dal.11;
        Wed, 01 Feb 2012 11:03:55 -0800 (PST)
X-Gmail-Fetch-Info: info@awaresystems.be 1 pop.awaresystems.be 110 info@awaresystems.be
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-k.one.com (mx-k.one.com [91.198.169.58])
	by mail9.b-one.net (Postfix) with ESMTP id CAE35401F08
	for <info@awaresystems.be>; Wed,  1 Feb 2012 19:58:17 +0100 (CET)
X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144])
	by mx-k.one.com (Postfix) with ESMTP id 71C554E075F
	for <info@awaresystems.be>; Wed,  1 Feb 2012 18:58:17 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 2B3B61EDABF;
	Wed,  1 Feb 2012 13:57:13 -0500 (EST)
Received: from na3sys009aog118.obsmtp.com (na3sys009aog118.obsmtp.com
	[74.125.149.244])
	by lists.maptools.org (Postfix) with ESMTPS id 1E68A1EDAAF
	for <tiff@lists.maptools.org>; Wed,  1 Feb 2012 13:33:18 -0500 (EST)
Received: from hub6.qnx.com ([209.226.137.86]) (using TLSv1) by
	na3sys009aob118.postini.com ([74.125.148.12]) with SMTP
	ID DSNKTymFaokPcEfecxkoAQYKnvndih37zN7g@postini.com;
	Wed, 01 Feb 2012 10:33:39 PST
Received: by hub6.qnx.com (Postfix, from userid 32767)
	id 17A863464F4A; Wed,  1 Feb 2012 13:33:13 -0500 (EST)
Received: from exhts2.ott.qnx.com (exhts2 [10.222.2.120])
	(using TLSv1 with cipher AES128-SHA (128/128 bits))
	(No client certificate requested)
	by hub6.qnx.com (Postfix) with ESMTPS id ABA8634653D8;
	Wed,  1 Feb 2012 13:13:45 -0500 (EST)
Received: from EXMBX1.ott.qnx.com ([fe80::c5ad:e9ef:74ad:52de]) by
	exhts2.ott.qnx.com ([fe80::a599:7194:354a:50d4%13]) with mapi id
	14.01.0355.002; Wed, 1 Feb 2012 13:12:42 -0500
From: Christopher Cameron <ccameron@qnx.com>
To: Olivier Paquet <olivier.paquet@gmail.com>
Thread-Topic: [Tiff] TIFFClientOpen() output stream/encoding behaviour
Thread-Index: AQHM3ElXXdyBWyP7JkuZj0u/UwlC/pYfQuCA//+xRICAAFc9gIAJFoKA
Date: Wed, 1 Feb 2012 18:12:42 +0000
Message-ID: <CB4EEA92.22CA%ccameron@qnx.com>
In-Reply-To: <CAAcuQebPNeK27B-bfdNJO7pF84jqSkDKos8skFfkhk-7dVuELg@mail.gmail.com>
Accept-Language: en-CA, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [10.222.102.221]
Content-ID: <BC8F4369577BFB418726900B9675DA1C@qnx.com>
MIME-Version: 1.0
Cc: "tiff@lists.maptools.org" <tiff@lists.maptools.org>
Subject: Re: [Tiff] TIFFClientOpen() output stream/encoding behaviour
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
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>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

There is will to change our streams to support proper seek() so we will be
doing that and making an exception such that TIFF images cannot be opened
unless random access is permitted.

Thanks to everyone who responded to my question!

Chris Cameron
Software Developer - Multimedia/Camera
ccameron@qnx.com




On 12-01-26 1:26 PM, "Olivier Paquet" <olivier.paquet@gmail.com> wrote:

>On Thu, Jan 26, 2012 at 1:13 PM, Christopher Cameron <ccameron@qnx.com>
>wrote:
>> As this can be deployed on a device with limited memory, buffering the
>> whole image first would be undesirable.
>
>Well, if you can read the input data twice (and know it will be
>exactly the same), you have the option of doing the compression twice:
>once to compute the strip sizes and once again to write the actual
>data. You can of course save as much of the compressed data as your
>memory will allow to make things faster.
>
>> And I suppose the strip offsets / byte counts can't simply come before
>> each strip right?
>>
>> Then the file would be formatted, e.g.
>>
>> Header -> IFD 0 -> Strip Offset 0 Strip Byte Count 0 -> Strip 0 -> Strip
>> Offset 1 -> Strip Byte Count 1 -> Strip 1 -> ...
>>
>> But I think I read that the strip offsets and bytecounts are contiguous
>> blocks...
>
>I haven't worked with the physical layout of a TIFF much but that's my
>understanding of the specification as well. I can't think of any way
>around it that would produce a reasonable TIFF file.
>
>Olivier

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