Return-Path: <tiff-bounces@lists.maptools.org>
Received: from inas028.isp.belgacom.be (localhost [127.0.0.1])
        by inav016.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AV-3.00) with ESMTP id j8J6bMWQ012901
        for <joris.at.lebbeke@skynet.be>; Mon, 19 Sep 2005 08:37:22 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inmx014.isp.belgacom.be (inmx014.isp.belgacom.be [195.238.2.217])
        by inas028.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AS-2.03) with ESMTP id j8J6bDp0023282
        for <joris.at.lebbeke@skynet.be>; Mon, 19 Sep 2005 08:37:15 +0200
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged))
        by inmx014.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id j8J6b9lx027316
        for <joris.at.lebbeke@skynet.be>; Mon, 19 Sep 2005 08:37:09 +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 j8J6VvXt001100;
	Mon, 19 Sep 2005 02:32:35 -0400
Received: from outmx006.isp.belgacom.be (outmx006.isp.belgacom.be
	[195.238.2.99])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id j8J6Vt0P001097
	for <tiff@lists.maptools.org>; Mon, 19 Sep 2005 02:31:55 -0400
Received: from outmx006.isp.belgacom.be (localhost [127.0.0.1])
	by outmx006.isp.belgacom.be (8.12.11/8.12.11/Skynet-OUT-2.22) with
	ESMTP id j8J6Vn4d002554
	for <tiff@lists.maptools.org>; Mon, 19 Sep 2005 08:31:49 +0200
	(envelope-from <joris.at.lebbeke@skynet.be>)
Received: from dfgrrxsknr4e (213-160.245.81.adsl.skynet.be [81.245.160.213])
	by outmx006.isp.belgacom.be (8.12.11/8.12.11/Skynet-OUT-2.22) with SMTP
	id j8J6Vhf1002511; Mon, 19 Sep 2005 08:31:44 +0200
	(envelope-from <joris.at.lebbeke@skynet.be>)
Message-ID: <002e01c5bce3$e485cfe0$d5a0f551@dfgrrxsknr4e>
From: "Joris" <joris.at.lebbeke@skynet.be>
To: =?iso-8859-1?Q?Fl=E1vio_Tiba?= <f_tiba@hotmail.com>,
        <tiff@lists.maptools.org>
References: <BAY14-F147A0CE7E01B56DC832EB5E8920@phx.gbl>
Subject: Re: [Tiff] How can I remove the last white lines?
Date: Mon, 19 Sep 2005 08:32:20 +0200
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
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/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-UIDL: 000000000023ceae.00000c37
X-MSP-STORE: Mon, 19 Sep 2005 08:37:23 +0200
Status:   

Flávio,

Flávio Tiba wrote:
> I am a new user of libtiff library and I have some doubts. I am
> developing a program to read a tiff file G3 and I need to clear the
> last white lines from file, I would like to know what api can I
> use?

It is not clear to me what you mean. You could mean either

- Changing the decompressed memory, i.e. not changing the actual file at
all. This is extremely easy.

- Transcoding, i.e. having a decompressor feeding a compressor, except
that the last few lines of 'food' are to be changed in the process. This
is easy.

- Same transcoding scheme applied to a single strip, in a single file,
i.e. decompressor feeds a compressor that writes a replacement for the
old strip back into the original file. This is probably still feasable.

- Changing actual encoded compressed data in a strip, so as to clear the
last lines in that strip, without changing anything else in the file.
This is possible in the case of G3 compression, I think, since the
compressed data for the cleared lines will be smaller or equal in size
to what was there given the G3 compression, and the lines are the last
ones, so the data block becomes a little shorter and only the
StripByteCount has to be adjusted to reflect that. It is the hardest
option though, and a good knowledge of G3 compression is required.

- Or perhaps, by 'clearing the last white lines', you mean that you
actually want to get rid of these lines alltogether, decrementing image
height?


Could you please explain which, if any, of the above guesses is what you
are after?


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/
