
                 Netpbm port to Windows 32
                         12/19/96

Netpbm is a toolkit for converting various image formats to and from
portable formats, and therefore to and from each other.  In addition to
the converters, the package includes some simple tools for manipulating 
the portable formats.

This package contains only the Win32 binaries (i386), the source code
specific to this port, and a few files from the full Netpbm package.  
The rest of Netpbm, which includes source and documentation, is contained in
the file netpbm-1mar94.p1.tar.gz which can be found where you got this
package or from ftp://ikaros.fysik4.kth.se/pub/netpbm.

This port of Netpbm should work in any Windows 32 system.  I've tested
in on Windows NT 3.51, 4.0 and Windows 95.

Programming Issues:

I combined the four p?m libraries into one library called netpbm.lib.
The Visual C++ 2.0 makefile libmsc.mak can be used to build this library.
The tiff library is libtiff/libtiff.lib and can be built using 
libtiff/libmsc.mak.  To build the executables, use the p?m/makefile.msc 
files.  The top-level makefile makefile.msc will build everything.

Since not all Win 32 systems support file system links, the makefiles
don't build the p?mmerge files.  Instead, each executable is made
individually.

Since many of the netpbm programs write to binary files using
stdin and stdout, I wrote a new main() function in win32.c that
sets the file mode for stdin and stdout to binary and then calls
the real main() function.  The real main() function gets renamed to
_win32_main() by using a define.  See pbm\makefile.msc and win32.c
for for details.

The files pbmplus.h, pnm\tifftopnm.c, and ppm\ppmtoxpm.c needed to be 
slightly modifed.  In addition, a bug was fixed in ppm\pgmtoppm.c.  The 
changes are shown below:

------------------------------------------------------------------------------
diff Original\pbmplus.h pbmplus.h
	67c67
	< /* #define PGM_BIGGRAYS */
	---
	> #define PGM_BIGGRAYS
	89c89
	< #if ( defined(SYSV) || defined(AMIGA) )
	---
	> #if ( defined(SYSV) || defined(AMIGA) || defined(WIN32) )
	100a101
	> #ifndef WIN32
	102a104
	> #endif /* WIN32 */
------------------------------------------------------------------------------
diff Original\pnm\tifftopnm.c pnm\tifftopnm.c
	30a31
	> #include <tiffcomp.h>
------------------------------------------------------------------------------
diff Original\ppm\ppmtoxpm.c ppm\ppmtoxpm.c
	41c41
	< #if defined(SYSV) || defined(SVR4)
	---
	> #if defined(SYSV) || defined(SVR4) || defined(NOSTRINGSH)
------------------------------------------------------------------------------
diff Original\ppm\pgmtoppm.c ppm\pgmtoppm.c
	125c125
	<
	---
	>               ppm_writeppmrow( stdout, pixelrow, cols, (pixval) maxval, 0 );
	140a141
	>               ppm_writeppmrow( stdout, pixelrow, cols, mapmaxval, 0 );
	142,143d142
	<
	<       ppm_writeppmrow( stdout, pixelrow, cols, (pixval) maxval, 0 );
------------------------------------------------------------------------------

If you have any questions or problems related to this port, please
e-mail me.

	Claudio Fahey
	claudio@osz.com
