Received: from sgi.sgi.com (192.48.153.1) by cerious.com
 with SMTP (Apple Internet Mail Server 1.1.1); Wed, 8 Jan 1997 19:11:34 -0500
Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by sgi.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id QAA05258; Wed, 8 Jan 1997 16:06:21 -0800
Received: (from daemon@localhost) by cthulhu.engr.sgi.com (950413.SGI.8.6.12/960327.SGI.AUTOCF) id WAA20878 for tiff-list; Wed, 8 Jan 1997 22:49:37 GMT
Received: from sgi.sgi.com (sgi.engr.sgi.com [192.26.80.37]) by cthulhu.engr.sgi.com (950413.SGI.8.6.12/960327.SGI.AUTOCF) via ESMTP id OAA20860 for <tiff-relay@relay.engr.sgi.com>; Wed, 8 Jan 1997 14:49:36 -0800
Received: from turing.mathworks.com (turing.mathworks.com [144.212.100.12]) by sgi.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id OAA19113 for <tiff@sgi.com>; Wed, 8 Jan 1997 14:49:32 -0800
Received: from eagle (eagle [144.212.2.20]) by turing.mathworks.com (8.8.4/8.7.3) with ESMTP id RAA01849 for <tiff@sgi.com>; Wed, 8 Jan 1997 17:49:30 -0500 (EST)
Received: from eagle id RAA25492 for <tiff@sgi.com>; Wed, 8 Jan 1997 17:25:09 -0500
Message-ID: <32D41EC5.167EB0E7@mathworks.com>
Date: Wed, 08 Jan 1997 17:25:09 -0500
From: Chuck Packard <chuck@mathworks.com>
Organization: The MathWorks, Inc., Natick, MA 01760
X-Mailer: Mozilla 3.0Gold (X11; I; SunOS 4.1.3 sun4m)
MIME-Version: 1.0
To: tiff@sgi.com
Subject: libtiff to write EPS preview
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-tiff@relay.engr.SGI.COM
Precedence: bulk
Status: R

Hi,

Great library ! I am using it to produce TIFF images of MATLAB graphics
at 300 dpi. The marketing guys just love this stuff. Makes for eye
catching collateral! 

Well, I of course did not write without a question. Or maybe it is an
enhancement request. I want to also use libtiff to output a TIFF preview
for an EPS file. To do that, I have to output the PostScript and then
the TIFF to the same file; along with a 30 byte header that precedes
both. Looks like I can call TIFFOpen with 'a' to tack the TIFF onto the
EPS file. But I also need to specify the length of the TIFF image in the
header. 

How can one find out how many bytes were written out for a TIFF image?
If I use no compression, then it is just width * height * 3 + H, were H
is some amount of TIFF header (tag) information. Anyone know what H is?

What if I do use packbits compression; how long is the file then? I
guess what would be great is some function I can call after TIFFClose
that tells me how many bytes were written out. When I looked at the code
for PackBitsEncodeI do not see any magical global keeping track of how
many bytes are being written out with each encoded strip. So I do not
see an easy modification to get at this information. Anyone ever look
into this? Anyone else need this?

--

Thanks,
Chuck Packard                             Tel: 508.647.7311
The MathWorks, Inc.                       Fax: 508.647.7002
cpackard@mathworks.com                    WWW: www.mathworks.com

"Our experts describe you as an appallingly dull fellow,
unimaginative, timid, lacking in initiative, spineless,
easily dominated, no sense of humor, tedious company, and
irrepressibly drab and awful, and whereas in most
professions, these would be considerable drawbacks, in
software engineering, they're a positive boon!"
Paraphrased Monty Python
