Status: Read
Received: from phillip.thumbsplus.com by phillip.thumbsplus.com (NTMail 3.02.11) with ESMTP id pcrews for <pcrews@cerious.com>; Fri, 23 May 1997 22:36:57 -0400
Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by sgi.sgi.com (950413.SGI.8.6.12/970507) via ESMTP id TAA12509; Fri, 23 May 1997 19:13:47 -0700
	env-from (owner-tiff@sgi.engr.sgi.com)
Received: (from majordomo@localhost) by cthulhu.engr.sgi.com (950413.SGI.8.6.12/960327.SGI.AUTOCF) id NAA15171 for tiff-list; Fri, 23 May 1997 13:51:54 -0700
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 NAA15159 for <tiff-relay@relay.engr.sgi.com>; Fri, 23 May 1997 13:51:52 -0700
Received: from tesla.netline.net (tesla.netline.net [204.117.219.2]) by sgi.sgi.com (950413.SGI.8.6.12/970507) via ESMTP id NAA27511
	for <tiff@sgi.com>; Fri, 23 May 1997 13:51:49 -0700
	env-from (kinch@tesla.netline.net)
Received: (from kinch@localhost) by tesla.netline.net (8.6.12/8.6.12) id QAA11718; Fri, 23 May 1997 16:42:59 -0400
Message-Id: <199705232042.QAA11718@tesla.netline.net>
Subject: Windows WIN32 DIB DLL available
To: tiff@sgi.com
Date: Fri, 23 May 1997 16:42:59 -0400 (EDT)
From: "Richard J. Kinch" <kinch@holonet.net>
X-Mailer: ELM [version 2.4 PL24]
Content-Type: text
Content-Length: 2497      
Sender: owner-tiff@fddi-sgi.engr.sgi.com
Precedence: bulk

I have developed a WIN32 DLL that returns a Windows DIB (device-independent
bitmap object) given a TIFF file, based on libtiff.  I would like to hear from
those who would like to help test and use such a component.
 
My own motivation was a reluctance to pay $600 to upgrade a 16-bit version of
a TIFF DLL that I had already paid $500 for (used in my commercial product, a
TeX typesetting package called TrueTeX).  There are perhaps a half-dozen such
TIFF DLL's available, all commercial and ranging in price from $300 to $1000,
usually royalty-free, but I found them all and without exception to be
seriously buggy, especially when applied to more exotic TIFF formats.  My
experience with libtiff in Unix was much better.  So, standing on the solid
shoulders of libtiff, I reached for the "make" side of the "make or buy"
decision.
 
DIB's are the easiest and most flexible way for a Windows application to
manipulate images, but since DIB's have a limited variety of representations
(paletted bitmaps of 1-, 4-, or 8-bits/pixel, plus 16- and 24-bit RGB), there
is some work involved (done by this DLL) to properly convert the richer TIFF
variety.  The DIB DLL converts TIFF grayscale images optimally using libtiff
scanline reading; for "deeper" images it simply falls back to the cruder
libtiff RGBA routines to create an approximate (and possibly inefficient)
24-bit RGB DIB.  Thus, anything libtiff can read, this DLL will turn into a
DIB in a more or less accurate and efficient form.  The conversions, plus the
straight mechanics of DIB creation, are done in a single additional C source
file of about 500 lines.
 
I have also created a makefile for MSVC++ 5.0 to build the DIB code and the
libtiff routines into a DLL.  Since I do a lot of both Unix and WIN32
development, and even wrote my own TIFF reader from scratch years ago, I have
been able to do this in the "correct" way.
 
At this point the code is pretty robust and handles almost all the formats,
within the limitations of libtiff.  The hope is to have a complete baseline
reader, plus whatever else libtiff will support.
 
If this is something you could use and are willing to help test (that is, you
write WIN32 applications that use DIB's), send me your e-mail address and I
will reply with a UUencoded ZIP file, containing the DLL, sample code, and
documentation.  Whether the finished product will be free and reflected into
Sam's master libtiff has not yet been decided, but all testers will receive a
free, final copy.

