N E T P B M
Release 9.16
Netpbm is a toolkit for manipulation of graphic images, including
conversion of images between a variety of different formats. There
are over 220 separate tools in the package including converters for
more than 80 graphics formats. Examples of the sort of image
manipulation we're talking about are: Shrinking an image by 10%;
Cutting the top half off of an image; Making a mirror image; Creating
a sequence of images that fade from one image to another;
The man page Netpbm.1 in the package has a more complete description
of what the package does.
The package is intended to be portable to many platforms. It has, at
least at one time, been tested under various Unix-based systems,
Windows, Mac OS X, VMS and Amiga OS. The maintainer uses and builds
it on a platform that consists (in relevant part) mainly of GNU
software (you probably know this kind of system by the name "Linux").
The goal of Netpbm is to be a single source for all the primitive
graphics utilities, especially converters, one might need. So if you
know of some freely redistributable software in this vein which is not
in the package yet, you should bring it to the attention of the Netpbm
maintainer so it can be included in the next release.
Netpbm replaces the widely spread Pbmplus package (released December
10, 1991). A lot of improvements and additions have been made. After
the latest release of Pbmplus, a lot of additional filters began
circulating on the net. The aim of Netpbm was to collect these and to
turn them into a package. This work has been performed by programmers
all over the world. If _you_ have some code to add, please contact
the Netpbm maintainer.
DISTRIBUTION
------------
You'll find the latest release of Netpbm source code at
.
A prebuilt version for Cygwin (Windows) is at
Contact Pierre A. Humblet .
A prebuilt version for DJGPP/GNU (DOS/Windows) is maintained by Mariano
Alvarez Fernandez . See
.
A prebuilt version for Windows using Mingw32 and GNU Bash is
distributed by the GnuWin32 Project. See
.
A prebuilt version for Solaris is at
.
Contact Mark Ashley .
Check out to see if the distribution has changed
since this file was written.
PREREQUISITES
-------------
Don't sweat the prerequisites too much. In most cases, if you're
missing something, the build of the programs that depend on it will
bomb, but the rest of the Netpbm programs will build just fine. And
you may not need the more demanding programs.
If you have trouble getting, building, or installing the
prerequisites, the Netpbm maintainer wants to know. Since he uses
them himself, he can help you. And if there is a problem with a
prerequisite package that its own maintainer cannot fix, it may be
possible to ship a fix with Netpbm.
To build pnmtotiff or tifftopnm or pnmtotiffcmyk, you need the Tiff
library. You can get it from http://www.libtiff.org.
To build ppmtojpeg or jpegtopnm, you need the JPEG/JFIF library from
the Independent JPEG Group (IJG). You can get it at
ftp://ftp.uu.net/graphics/jpeg. See http://www.ijg.org for more
information. You need Release 6 or better. With Release 5, Netpbm
build fails with undefined jpeg symbols.
You may also need the JPEG library to build the Tiff converters. If
your Tiff library references a shared JPEG library, then you do. The
Tiff library may also include a static copy of the JPEG library, in
which case you won't need a separate JPEG library. Or it may have
been built without any JPEG compression capability, in which case you
won't need a separate JPEG library, but the Tiff converters won't be
able to handle Tiff with JPEG compression.
The same goes for Ppmtompeg. You need the jpeg library if you want to
create MPEGs from JPEGs (without the loss of quality that comes with
converting from JPEG to PPM first), and if you don't have the JPEG
library and don't say so in Makefile.config, you won't be able to
build Ppmtompeg at all.
To build or use Pnmtopng and Pngtopnm, you need the zlib compression
library and the PNG library (libpng). You can get zlib from
ftp://quest.jpl.nasa.gov/pub/zlib or
ftp://metalab.unc.edu/pub/Linux/libs. You can get libpng from
http://www.libpng.org/pub/png/libpng.html or
http://libpng.sourceforge.net. Older libpng won't work -- you get
unresolved external references to png_sig_cmp and png_set_sig_bytes.
Pstopnm (the Postscript to PNM image converter) requires Ghostscript
(installed with the name 'gs' in your command search path). And it
requires in particular that Ghostscript be built with the relevant
PNM device drivers. See http://www.gnu.org/ghostscript/ .
The Utah Raster Toolkit is not a prerequisite because Netpbm includes
a subset of it that meets the needs of Pnmtorle and Rletopnm.
However, you can also substitute the real package by properly
configuring Makefile.config. You can get it from
ftp://ftp.cs.utah.edu/pub/dept/OLD/pub/urt-3.1b.tar.Z. There's a
patch at ftp://ptolemy.berkeley.edu/pub/misc/urt/urt-3.1b-3.1b1.patch
For more prerequisite information for CYGWIN (Windows), see the Cygwin
section below.
INSTALLATION
------------
For most typical platforms, you can just do
configure
followed by
make
To build all the programs. Then
make install
to install them all.
The 'configure' program is not GNU Autoconf -- it is a simple program
specific to Netpbm that prompts you for information about your system.
If your system is not typical, you'll have to do a little more work,
as described below under "custom installation."
The only tricky part about installing is setting up the shared libraries
that are part of Netpbm. 'make install' copies them into place, but that
may not be enough. If you get mysterious "file not found" kinds of
errors and are not an expert with shared libraries, see the section
"SHARED LIBRARIES" below.
You may want to append the contents of the file 'magic' to your 'file'
database (typically /etc/magic). This allows the 'file' program to
recognize a bunch of file formats, including the Netpbm formats.
The --keep-going option to Make is handy, because it causes Make to
make anything it can, as opposed to quitting as soon as something goes
wrong. With so many parts having so many requirements, it's not
unusual for a few things to fail to build, but that doesn't affect
everything else. You can work on the failed parts and repeat the make
and it will attempt to build whatever it hasn't successfully built
yet.
INSTALLATION - CYGWIN
---------------------
(See also the general installation instructions above).
Cygwin is a software package that sets up a Unix-like platform on a
Windows (win32) system. Here are some specific things you need in
that environment to build and use Netpbm. All these programs and
libraries are parts of cygwin package.
Programs:
1) gcc suite
2) binutils
3) bash
4) dlltool
5) flex & byacc
6) patch
7) install
8) rm, ln, cp and other file utilities
Libraries:
1) libtiff (cygtiff3.dll)
2) libpng (cygpng2.dll)
3) libjpeg6b (cygjpeg6b.dll)
4) libz (cygz.dll)
In addition to running 'configure' and/or manually editing Makefile.config,
you must edit pm_config.h as directed in comments that include the word
"Windows". (The plan is to make 'configure' do this for you in a future
release).
You will need to copy pbm/libpbm.dll, pgm/libpgm.dll, pnm/libpnm.dll
and ppm/libppm.dll into any directory, which are in your PATH (for example,
into $CYGWIN_ROOT/bin) after doing 'make install'.
THIS SECTION IS STILL UNDER CONSTRUCTION. BUT THIS WILL GET YOU STARTED.
2001.05.22.
INSTALLATION - MAKING ONLY THE PARTS YOU NEED
---------------------------------------------
If you don't need the whole package, but just want one tool in it that you
heard about, you can make just that one. For example, to make Ppmtojpeg,
just do
configure
cd ppm
make ppmtojpeg
It will build Ppmtojpeg and any of its dependencies, but nothing else.
You have to install it manually.
When you build just one program, you should request static libraries
in the configure step, because for just one program, the shared
libraries would be pure masochism.
CUSTOM INSTALLATION
-------------------
This section explains how to customize the installation in the case that
your platform is, or your requirements are, not among the simple cases that
'configure' understands. 'configure' is really just a convenient way to
build the Makefile.config file, and in the most general case, you build
that file manually.
Makefile.config contains settings for various things that vary from
one system to the next, like file paths. Start with the distributed
file Makefile.config.in. Copy it as Makefile.config, then edit it.
Search for your platform name (Solaris, SunOS, NetBSD, Cygwin, BeOS,
and Tru64 are mentioned) to see recommended settings for your
platform.
Unless you want to do some make file rewriting, you will need to use
GNU Make even if nothing else on your system is GNU, because the
Netpbm make files exploit some advanced features of GNU Make. Often,
systems have both GNU Make and a native Make. In this case, GNU Make
is named 'gmake'. If you don't have it yet, see www.gnu.org/software.
GNU Make is free, easy to install, and works just about anywhere.
If your system is even too exotic to accomodate with settings in
Makefile.config, you may need to modify things in the main make files
or pm_config.h.
On Windows, you at least have to uncomment the #define HAVE_SETMODE
line in pm_config.h. From Netpbm's perspective, Windows is pretty
exotic.
If you figure out how to install on other platforms, contact the
Netpbm maintainer to have the 'configure' program or these
instructions improved for the next person.
INSTALLATION - MISCELLANEOUS
----------------------------
After installing the manual pages, you may want to create the "whatis"
file by doing a catman -w -M , or makewhatis -w, or
whatever the equivalent is on your system. Without Whatis, you may
have a hard time finding the Netpbm tools you have installed.
INSTALLATION - SHARED LIBRARIES
-------------------------------
There are over 220 programs in the Netpbm package and they do a lot of
common things. In order to avoid the expense of copying the code for
those common things into every program, Netpbm places it in 4 shared
libraries: libpbm, libpgm, libppm, and libpnm. When you invoke a
Netpbm program, your system notices that it needs these libraries and
accesses them too.
The tricky part of installing the shared (runtime) libraries is
telling your system where to find them in the event that you invoke a
Netpbm program. And that varies from one system to the next.
On a GNU libc system (essentially, any Linux-based system), if you put
the Netpbm shared libraries in a conventional spot (say, /lib) and
reboot your system, chances are you will have no trouble running
Netpbm programs. But if you want to fine tune things, read up on
ld-linux.so (GNU libc's dynamic linker) and ldconfig and consider the
/etc/ld.so.conf file and LD_LIBRARY_PATH environment variables. Use
'ldd' to see if you have a shared library issue. If it shows any
shared library as "not found", you've got library trouble.
One final note: New Netpbm executables often can run OK with old
Netpbm shared libraries. This means if you don't correctly install
the new libraries, you may run what you think is a new Netpbm program,
but in actuality be accessing the old Netpbm library, and you may not
even notice a problem right away. But eventually, you may find some
things not working the way they should. Again, 'ldd' will give you
peace of mind.
INSTALLATION WITHOUT SHARED LIBRARIES
-------------------------------------
Since shared libraries can be such a pain, and in fact some systems
don't even have them, you can build Netpbm with static libraries
instead. Just answer "static" to the static/shared question when you
run 'configure' (if you don't use 'configure', set NETPBMLIBTYPE as
directed in Makefile.config).
If you do this, you probably want to do a merge build instead of the
normal build:
make merge
make install-merge
This creates several large ("merged") programs that contain the
functions of lots of smaller programs. When you invoke a merged
program, it behaves like the smaller program whose name matches the
command you used to invoke the merged program. For example, Ppmtogif
and Ppmtobmp get merged into a program called Ppmmerge. You install
it with a symbolic link such that when you invoke 'ppmtogif' you get
'ppmmerge'. When you invoke 'ppmtogif', Ppmmerge executes Ppmtogif.
Hence, 'make install-merge' installs the large merged programs and
creates lots of symbolic links to them.
The point of this is to reduce the duplication of all the library
functions across large numbers of programs.
SUPPORT
-------
The maintainer of Netpbm, since September 1999, is Bryan Henderson:
bryanh@giraffe-data.com. Or as a backup, giraffedata@yahoo.com.
Bryan actively maintains the package and wants to know about any bugs
or problems people have with Netpbm or suggestions for improvement.
HISTORY
-------
See the file HISTORY.
MORE INFORMATION
----------------
A good place to start for information about the wide world of computer
graphics is http://www.faqs.org/faqs/graphics/ .
Information about PNG is at http://schaik.com/png.
COPYRIGHTS
----------
See the file COPYRIGHT.