|TIFF and LibTiff Mailing List Archive|
LibTiff Mailing List
1994.11.03 23:59 "LibTiff for Windows available", by Soren Pingel Dalsgaard
Hi, I have now made LibTiff for Windows available for anonymous ftp from ftp.daimi.aau.dk in the directory /pub/pc/tiff. The file is called v330b21a.exe (v3.30 beta 021 windows version a). The execatuable file should run from within windows. The libtiffw.txt (installation notes) reads as follows: This is LibTIFF for Windows, LibTiffW for short. The port was done by SaPiD Software Soren Pingel Dalsgaard Viborgvej 29, 2.tv. DK-8000 Aarhus C DENMARK The sources are derived from LibTIFF by Sam Leffler. His copyright notice applies to the sources: Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994 Sam Leffler Copyright (c) 1991, 1992, 1993, 1994 Silicon Graphics, Inc. Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that (i) the above copyright notices and this permission notice appear in all copies of the software and related documentation, and (ii) the names of Sam Leffler and Silicon Graphics may not be used in any advertising or publicity relating to the software without the specific, prior written permission of Sam Leffler and Silicon Graphics. THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. With the addition: IN NO EVENT SHALL SOREN PINGEL DALSGAARD OR SAPID SOFTWARE BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. About the library. I will not go into much detail with the library itself. Instead I will emphasize on the changes from the original libtiff library. For information on the original library please refer to the man pages included in the original library. Use anonymous ftp to sgi.com and check the directory /graphics/tiff. Only the LibTiffW sources and the (modified) tools sources are included in this package. The first thing to be aware of is: pointers. Pointers are the single most used feature used in C. This combined with the fact that the original library was (and still is) targeted primarily at 32bit operating systems has forced me to compile the entire library as a "huge" library. This means that all pointers are huge. Huge pointers are somewhat slower than normal (far or near) pointers because additional checks must be made to when a 64K segment boundary is crossed. After several days of trying to identify which parts of the code needed the huge pointers and which did not, I finally gave up and settled for compatibility instead of speed. Windows 3.1 is supposed to be replaced by Windows 95 (Chicago) sometime in the near future (1995 :-) ?) and it will support true 32bit code. And before you ask: Yes I am working on a Win32 port of the library. What this means for you is that if your Windows program that should use LibTiffW is not huge you have to change the tiffio.h file. To be more specific, all parameters and return types of the type 'char *' should be changed to 'char huge *'. I have not had the time to do this yet. Some (minor) limitations had to be imposed on the project apart from the huge pointer stuff, though. You should also be aware of these changes before you start programming: 1) The make job is a Microsoft Visual C++ (MSVC) 1.5 project file. That means that the sources for LibTiffW should be placed in the directory c:\users\sapid\develop\libtiff\libtiffw. If you move the sources to another directory you need to update the make job manually or have MSVC 1.5 do the job. 2) TIFFPrint does *NOT* work. The printf's of this function was kept for compatibility with LibTIFF and as a result (Windows 3.1 does not support printf) calling this function will generate an error. 3) As an addtion to the LibTIFF library some functions (that were previously private to the library) have been made public. They are: _TIFFmalloc, _TIFFrealloc, _TIFFfree, _TIFFmemset, _TIFFmemcmp and _TIFFmemcpy In a future relase the names will most likely have the '_' removed. It is extremely important that you use these functions if you want to make sure that you allocate and handle the proper type of memory. Once you are aware of these limitations, you should be ready to use of the library. Be sure to put the libtiffw.dll somewhere in your path (c:\windows\system) and remember to link libtiffw.lib into your application. If you do not compile the library, but chose to use the included DLL you should be aware that it has been compiled for 80386 cpus and up. If you wish to use it on a 80286 cpu you need to use MSVC 1.5 to change the project setup for the release compilation and recompile. The LibTiffW library does not include limitations as the only difference from the original library. It has been extended with the ability to write tiff images of either big endian or little endian regardless of the byte ordering of the computer (little endian in this case). You should be aware that Sam Leffler does not approve of this change because the TIFF 6.0 documentation clearly states that the byte ordering problem is 100% a problem to be handled by the TIFF reader. In reality, however, some programs for the Macintosh computer will only read big endian TIFF images. The opposite may be try for some PC programs, but I haven't seen such a program yet. With the LibTiffW you should be able to satisfy 100% of you customers! The big/little endian selection has been added to the TIFFOpen call. The mode now has the following possible values: r read image a append image using same byte order as existing file w write image using native byte ordering wb write image using big endian byte ordering wl write image using little endian byte ordering Because the implementation of the functionality has been changed, I would like to know about any problems encountered with this new feature. Most tools were also ported. Some without modification, some with some bug-fixes. I have reported all these changes to Sam Leffler, please do NOT report them again. The tools were compiled as QuickWin applications. They should be started from the program manager or the file manager using File|Run. In the edit field enter the entire command, e.g. 'tiffcp -t -w 32 -h 32 strip.tif tile.tif'. The program will display "Finished" in the status line when you can close it. Invokinga tool without parameters will print a help message. The tiff2ps tool was changed because QuickWin applications do not support redirection of stdout. The last parameter for tiff2ps is now taken to be the destination file. (Almost) all tools were changed to support '-E big' or '-E little' to force a specific byte order. Please let me know if you find any errors. The latest LibTiffW sources are available via anonymous ftp from ftp.daimi.aau.dk in directory /pub/pc/tiff. In the future there may not be any need for a LibTiffW library. Either because it becomes outdated or because it becomes 100% merged into the libtiff library. In this case please check sgi.com in directory /graphics/tiff. This document was compiled in less than an hour, so please let me know if I have left out important information. Questions (and answers) can be sent to: SaPiD Software Soren Pingel Dalsgaard Viborgvej 29, 2.tv. DK-8000 Aarhus C DENMARK Telephone number: +45 8619 0606 Internet address: email@example.com -- Soren Pingel Dalsgaard, Computer Science Department )\._..--....,---, Aarhus University, Ny Munkegade 116, DK-8000 Aarhus /, _.. \ _.. ,`._ ,. DENMARK, email:firstname.lastname@example.org, ph:+45 89423284`._.-(___.'..(___.'`-.;.'