Libtiff for Win32

People have been telling me that they are having trouble compiling libtiff for win32 platforms, so I have decided to include a copy here.

The versions available are:

  • libtiff.lib (3.5.4)
  • libtiff.dll (3.5.4) and the import library libtiff_i.lib

    You’ll also need the include files, which are:

  • g3states.h
  • t4.h
  • tif_dir.h
  • tif_fax3.h
  • tif_predict.h
  • tiff.h
  • tiffcomp.h
  • tiffconf.h
  • tiffio.h
  • tiffiop.h
  • uvcode.h
  • version.h

    There also also some handy tools, which are:

  • fax2ps.exe
  • fax2tiff.exe
  • gif2tiff.exe
  • pal2rgb.exe
  • ppm2tiff.exe
  • ras2tiff.exe
  • rgb2ycbcr.exe
  • thumbnail.exe
  • tiff2bw.exe
  • tiff2ps.exe
  • tiff2rgba.exe
  • tiffcmp.exe
  • tiffcp.exe
  • tiffdither.exe
  • tiffdump.exe
  • tiffinfo.exe
  • tiffmedian.exe
  • tiffsplit.exe

    The instructions for how to compile the library are as follows:

  • Uncompress the libtiff distibution
  • Change directory into the libtiff directory inside the distribution
  • Copy ..\contrib\winnt\fax3sm.c to fax3sm_winnt.c
  • Copy ..\contrib\winnt\libtiff.def to libtiff.def
  • Remove the line for TIFFModeCCITTFax3 from the libtiff.def file
  • Change the line for TIFFFlushdata1 in the libtiff.def file to TIFFFlushData1
  • nmake /f all
  • Done!

    To compile the tools once you have the library, just change into the tools directory and do a nmake /f

    All of this is also available as one big .zip file, as well as a gzipped tarball (both of which WinZip can open).

  • Comparison the PDF generation APIs

    I have been doing some surfing and thought the following summary of the capability of the various PDF creation APIs might be useful to others. I see Panda having all of the functionality listed below as it becomes more mature over time. Where possible, I have indicated a timeframe in which implemenation might occur.

    Feature Panda Stable Panda Future Adobe ClibPDF PDFLib UniSoft Imaging vividX
    Images: GIF N Never          
    Images: JPEG Y            
    Images: PNG N 0.4          
    Images: TIFF: Group 3 Fax 1D Y            
    Images: TIFF: Group 3 Fax 2D Y            
    Images: TIFF: Group 4 Fax Y            


  • GIF will never be supported by Panda because of the Patents associated with the LZW compression algorithm. The only exception to this would be if it was free to decompress LZW, and the data could then be written out as something else.
  • Sunday

    Sunday was a productive day. I went to church, I had Doug look at my TV and debug the over heating problem, I mowed the lawn and got in some practise for golf in the hope of further improving my fantastic scores. I even got around to fixing the broken outdoor furniture…

    PandaLex is starting to take a little more shape. I was rusty on Bison and Flex, so having to code some without the aid of the book is a little hard on the soul, but I’m getting there now. Thinsg started to go much better when I realised that code is included in the $x numbering scheme. It does make me wonder how much pain people go through when they change some code in a terminal though — perhaps they simply put dummy code blocks everywhere so that they never have to change the numbering?

    PandaLex is going to have a series of callbacks as the hooks for the user application, which isn’t very hard to implement. Assuming I have some free time in the next week I am confident that it shouldn’t take me too much longer than a week to code it up — then again there is debugging and testing in there as well.

    Anyway, that was my first day in online diary land.



    Well another day nearly over. They announced today that the reorganisation would go ahead — I am now officially an application developer!

    Had a play with the PDF parser, which I am coding on at the moment, which means it is getting ever closer. The wierd bit is that I am coding it during a Tupperware party. I’m pretty sure that means that if you have problems with the parser, then you can return it to Tupperware to have it fixed. However, please not that it is not dishwasher safe.

    Uni of Canberra is also incompetent. Well, not all of them, the Professional Management Programs people keep changing my summer course on me, so I am not sure if I will ever get it done or not. Oh well, we’ll have to wait and see.

    Oh, and I am ordered by ADSL connection today. Telstra is cool — they are giving me a free PCMCIA network card as part of the connection, which means I make about a $10 profit on the connect. Soon I’ll have a permanent Internet connection at 512kb! Welcome to nerd central.


    Because my life is fundamentally boring, I thought I should share it with you. Failing that, everyone else has an online diary, so I didn’t want to be left out…

    Why PandaLex?

    I have been thinking for the last day or so, and it occurs to me that the PDF parsing functionality in Panda is more generally useful than what is needed for Panda itself. For instance, the parse could also be used for pdf viewers, pdf modification (what Panda needs it for), or anything else you can think of.

    A good simple, and probably fairly common use of PandaLex would be a simple program to count the number of pages in a PDF document from the command line. This could be useful for determining if the document is damaged or something.

    Therefore, welcome to PandaLex‘s page… This is where development work for PandaLex will occur.