• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..08-Jul-2021-

Makefile.amH A D08-Jul-20211.3 KiB281

Makefile.inH A D08-Jul-202111.2 KiB386308

Makefile.w95H A D08-Jul-20213.2 KiB13576

README.TiffileH A D08-Jul-20211.2 KiB3224

README.tiff2dibH A D08-Jul-20211.5 KiB5235

Tiffile.cppH A D08-Jul-202112.7 KiB443288

tiff2dib.cH A D08-Jul-202110.7 KiB373217

README.Tiffile

1Frank,
2
3I attached a file that uses RGBA interface (tif_getimage.c) to read a tiff
4file and convert to a DIB.  It's advantage is that it is easy to read *any*
5tiff file suported by libtiff and easily convert it to a DIB.  The disadvantage
6is that bilevel (B&W) bitmaps (and all other non-rgba images) are also
7converted to RGBA, thus taking up 32x as much memory as needed (4 bytes per
8pixel, rather than 1 bit).  I read tiff files, but don't need to
9write them.  And my files are typically small, so the overhead is mostly
10inconsequential.  But for bilevel images, I overrode the get() and put()
11routines of the RGBA interface to just copy the data from the input raster
12to the output raster, rather than expanding out to full 32 bit format.  It
13would be nice if there were a simple way to handle all palletized images,
14but that would take more custom routines, and it's not that important to me.
15
16Usage:
17
18    m_pDIB = (PBITMAPINFOHEADER)::ReadTIFF(pathName);
19    if (m_pDIB != 0) {
20       m_format = IMAGETYPE_TIF;
21    }
22
23This is intended as Win32, but the modifications for new get() and put()
24routines may be independent of platform.
25
26Thanks for your work supporting the forum and the library!
27
28Regards,
29
30Mark James
31mark@james.net
32

README.tiff2dib

1
2Date: 04 Dec 95 10:34:23 EST
3From: Philippe <100423.3705@compuserve.com>
4To: TIFF/sam Leffler <sam@cthulhu.engr.sgi.com>
5Subject: TIFF library and Windows 95
6Message-Id: <951204153422_100423.3705_BHG101-1@CompuServe.COM>
7
8Sam,
9
10First, let me thanks all of you how have worked
11on that great TIFF library !
12
13Here is some information that may help someone.
14
15I build the library under Windows 95 as a 32-bit library.
16The contribution of Scott Wagner (tif_win32.c) worked fine, but
17the makefile "makefile.msc" was unsable because it was
18written for DOS or Windows 3.1 and all the files names
19are limited to 8 characters.
20
21Here is the makefile I used : makefile.w95
22
23Also, I had to disable fax3 support because I wasn't able
24to build (as it is) the tool "mkg3states" to generate the include
25file "g3states.h".
26This source file must be modify to be build under Windows 95.
27
28To build the library under Windows 95 with Visual C++ 2.0,
29I had to :
30
31- undefine CCITT_SUPPORT in "tiffconf.h"
32
33- create the file version.h with this line :
34      #define VERSION "3.4beta024"
35
36- build the makefile "makefile.w95"
37
38I also join the source file "tif2dib.c" that I created,
39it contain the function LoadTIFFinDIB that load
40a TIFF file and build a memory DIB with it and return the
41HANDLE (HDIB) of the memory bloc containing this DIB.
42Since DIB is the "natural" bitmap format for Windows 3.1, 95 and NT,
43this function sould be usefull for some Windows 95 (or NT) developer.
44
45
46Sorry for my approximate english ...
47
48Regards,
49
50Philippe Tenenhaus   100423.3705@compuserve.com
51Paris
52