Return-Path: <tiff-bounces@lists.maptools.org>
Received: from inas010.isp.belgacom.be (localhost [127.0.0.1])
        by inav012.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AV-3.00) with ESMTP id jBDLrVA5007465
        for <joris.at.lebbeke@skynet.be>; Tue, 13 Dec 2005 22:53:31 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inmx009.isp.belgacom.be (inmx009.isp.belgacom.be [195.238.5.146])
        by inas010.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AS-2.03) with ESMTP id jBDLrO6s024673
        for <joris.at.lebbeke@skynet.be>; Tue, 13 Dec 2005 22:53:25 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged))
        by inmx009.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id jBDLrCXL013255
        for <joris.at.lebbeke@skynet.be>; Tue, 13 Dec 2005 22:53:13 +0100
        (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 jBDLl76q021958;
	Tue, 13 Dec 2005 16:47:19 -0500
Received: from cgp.spb.edu (vlan3.cgp.spb.edu [195.70.196.207])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id jBDLl22K021952
	for <tiff@lists.maptools.org>; Tue, 13 Dec 2005 16:47:02 -0500
Received: from wg.pu.ru ([193.124.85.219] verified)
	by cgp.spb.edu (CommuniGate Pro SMTP 4.3c5)
	with ESMTP id 17733465 for tiff@lists.maptools.org;
	Wed, 14 Dec 2005 00:47:01 +0300
Received: (from uucp@localhost)
	by wg.pu.ru (8.9.1a/8.9.1) with UUCP id VAA02378
	for tiff@lists.maptools.org; Tue, 13 Dec 2005 21:46:56 GMT
Received: from ak4719.spb.edu (localhost [127.0.0.1])
	by ak4719.spb.edu (8.13.5/8.13.5/Debian-3) with ESMTP id jBDLduqJ024164
	for <tiff@lists.maptools.org>; Wed, 14 Dec 2005 00:39:56 +0300
Received: (from dron@localhost)
	by ak4719.spb.edu (8.13.5/8.13.5/Submit) id jBDLduDm024160
	for tiff@lists.maptools.org; Wed, 14 Dec 2005 00:39:56 +0300
From: Andrey Kiselev <dron@ak4719.spb.edu>
Date: Wed, 14 Dec 2005 00:39:56 +0300
To: tiff@lists.maptools.org
Subject: Re: [Tiff] read and write image with same TIFF handle
Message-ID: <20051213213956.GD31418@ak4719.spb.edu>
Mail-Followup-To: tiff@lists.maptools.org
References: <174541853015.20051213202005@mail.ru>
MIME-Version: 1.0
Content-Type: text/plain; charset=koi8-r
Content-Disposition: inline
In-Reply-To: <174541853015.20051213202005@mail.ru>
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.11
X-Virus-Scanned: ClamAV version 0.87, clamav-milter version 0.87 on ak4719
X-Virus-Status: Clean
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
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by inav012.isp.belgacom.be id jBDLrVA5007465
X-UIDL: 000000000023ceae.00000f80
X-MSP-STORE: Tue, 13 Dec 2005 22:53:36 +0100
Status:   

Eugene,

On Tue, Dec 13, 2005 at 08:20:05PM +0200, =FB=C5=C2=C5=CB=CF =E5=D7=C7=C5=
=CE=C9=CA wrote:
>   As I see, I cann't to read and write image data in one session, i.e.
>   using one TIFF handle.
>   The problem in codec's setup. There are only one flags in libtiff
>   TIFF_CODERSETUP that indicate that codec inited for decode, or code
>   process (tif->tif_setupdecode,tif->tif_setupencode)
>=20
>   First call TIFFReadTile() for example codec setup for decode. Then
>   later TIFFWriteTile() but TIFF_CODERSETUP still set and
>   tif->tif_setupencode never called. As a result libtiff crash in
>   codec.
>=20
>   Is it known problem?

Yes, it is.

>   Is in plans to fix it?

Yes, but no timeframe :-)

>   Is problem with codec is only one problem to read and write image
>   with same TIFF handle?

Certainly there are more problems with that. However, it should be
possible to open uncompressed images in update mode (yes, I am remember
one of your previous posts related to problem with TIFFAppendToStrip, it
is not fixed yet, but will be fixed before the next release). More
problems with compressed files: every codec should be revised and
corrected. There was an attempt to do that and now update mode works in
some cases.

>   Actually I can to fix it itself.
>   It is not dificult replace TIFF_CODERSETUP with 2 flags
>   TIFF_CODERSETUP, TIFF_DECODERSETUP and to control in initialization
>   code that only one flag could be set.
>=20
>   2. question
>      When next version of libtiff are expected?

I am planning to release it before the holidays. But you always can take
the fresh snapshot from CVS.

>      If I make some useful changes in libtiff may I expect that this
>      changes will be included in libtiff? And how can I do it?

Of course, contributions are always welcome. The algorithm is simple:

 1. Grab the CVS snapshot.
 2. Prepare patch using diff utility (unified patches with "diff -u"
    command are most convinent).
 3. Create Bugzilla report and attach your patch to it.

Best regards,
Andrey

--=20
Andrey V. Kiselev
ICQ# 26871517
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
