Return-Path: owner-tiff@olympiakos.com
Return-Path: <owner-tiff@olympiakos.com>
Received: from nataly.at1895.spb.edu (localhost [127.0.0.1])
	by at1895.spb.edu (8.12.4/8.12.4/Debian-4) with ESMTP id g6ODWgxd019714
	for <dron@at1895.spb.edu>; Wed, 24 Jul 2002 17:32:42 +0400
Received: from olympiakos.com (uucp@localhost)
	by nataly.at1895.spb.edu (8.12.4/8.12.4/Debian-4) with UUCP id g6ODWgkp019712
	for dron@at1895.spb.edu; Wed, 24 Jul 2002 17:32:42 +0400
Received: from knot.pu.ru (knot.pu.ru [193.124.85.214] (may be forged))
	by wg.pu.ru (8.9.1a/8.9.1) with ESMTP id NAA23653
	for <dron@at1895.spb.edu>; Wed, 24 Jul 2002 13:06:52 GMT
Received: from gate7.olympiakos.com (sdsl-64-32-199-150.dsl.iad.megapath.net [64.32.199.150])
	by knot.pu.ru (8.9.3/8.9.0) with ESMTP id RAA34013
	for <dron@at1895.spb.edu>; Wed, 24 Jul 2002 17:06:51 +0400 (MSD)
Received: from localhost (daemon@localhost)
	by gate7.olympiakos.com (8.9.3/8.9.3) with SMTP id JAA00840;
	Wed, 24 Jul 2002 09:00:27 -0400
Received: by gate7.olympiakos.com (bulk_mailer v1.9); Wed, 24 Jul 2002 08:52:09 -0400
Received: (from majordom@localhost)
	by gate7.olympiakos.com (8.9.3/8.9.3) id IAA00756
	for tiff-outgoing; Wed, 24 Jul 2002 08:52:09 -0400
X-Authentication-Warning: gate7.olympiakos.com: majordom set sender to owner-tiff@olympiakos.com using -f
Received: from lilly.ping.de (IDENT:qmailr@lilly.ping.de [62.72.90.2])
	by gate7.olympiakos.com (8.9.3/8.9.3) with SMTP id IAA00753
	for <tiff@olympiakos.com>; Wed, 24 Jul 2002 08:52:08 -0400
Received: (qmail 17499 invoked by uid 10); 24 Jul 2002 12:52:06 -0000
Received: from cliwe.ping.de by lilly.ping.de with UUCP (rmail-0.2-fdc); 24 Jul 2002 12:52:06 -0000
Received: (qmail 20204 invoked by uid 500); 24 Jul 2002 12:51:55 -0000
To: faxguy@howardsilvan.com
Cc: tiff@olympiakos.com
Subject: Re: CCITT Group 4 assistence needed for HylaFAX
References: <20020723225031.GA3059@bilbo> <m3lm81y3el.fsf@sabre.ping.de>
	<20020724114450.GE3059@bilbo>
From: fdc@cliwe.ping.de (Frank D. Cringle)
Date: 24 Jul 2002 14:51:54 +0200
In-Reply-To: <20020724114450.GE3059@bilbo>
Message-ID: <m38z41xp91.fsf@sabre.ping.de>
User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: owner-tiff@olympiakos.com
Precedence: bulk
Status: RO
Content-Length: 1884
Lines: 42

Lee Howard <faxguy@howardsilvan.com> writes:
> > If you really need to count the lines in a G4 image, you need to know
> > the precise width and then run through all the data, interpreting each
> > code bitstring as you go.
> 
> The image width is known because it is part of the negotiated session
> parameters, but I don't particularly feel like writing a G4 decoder
> (but - see below - that may be unavoidable) :-)

No need to write one, there is one in libtiff.

> > As to adding or replacing initial lines, the easiest way would be to
> > expand the image into a bitmap, replace the lines and then re-encode
> > the image.
> 
> By expanding the image into a bitmap I presume you mean via an
> external tool.

Well, I was assuming that libtiff is linked in to your application.
If all you have are the raw G4 data, you need to fake up some data
structures before calling the decode routines in libtiff.  At least I
assume that would be possible.  Then libtiff gives you the image in
the form of lines of pixels.

>  For portability purposes and sanity, I'm not sure this
> is an ideal option - but, following this approach, we could convert it
> to G3, use the existing mechanism to image the tagline, and then
> convert it back to G4.  But... as I said, this isn't ideal.
> 
> 
> > Doing it more efficiently by just replacing the relevant
> > part of the raw data should be possible but rather fiddly.
> 
> Any more fiddly than with G3?  We're already editing raw data with G3.

Simple G3 (one-d encoded, lines padded to byte boundaries) is easier
because because you can detach and attach lines without interaction
with the remaining lines.

-- 
Frank Cringle,      fdc@cliwe.ping.de
voice: (+49 7745) 928759; fax: 928761

To subscribe or unsubscribe email tiff-request@olympiakos.com with subscribe
or unsubscribe in the email body.  Libtiff home page: http://www.libtiff.org

