home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-10-16 | 57.0 KB | 1,404 lines |
- Newsgroups: comp.sources.misc
- From: jef@well.sf.ca.us (Jef Poskanzer)
- Subject: REPOST: v23i036: pbmplus - Extended Portable Bitmap Toolkit, Part01/24
- Message-ID: <1991Oct15.015451.16314@sparky.imd.sterling.com>
- X-Md4-Signature: 6af94d7cfa30f80c75087ba750b38c52
- Date: Tue, 15 Oct 1991 01:54:51 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: jef@well.sf.ca.us (Jef Poskanzer)
- Posting-number: Volume 23, Issue 36
- Archive-name: pbmplus/part01
- Environment: UNIX
-
- Extended Portable Bitmap Toolkit
- Distribution of 27sep91
- Previous distribution 05feb91
-
- PBMPLUS is a toolkit for converting various image formats to and from
- portable formats, and therefore to and from each other. The idea is,
- if you want to convert among N image formats, you only need 2*N
- conversion filters, instead of the N^2 you would need if you wrote each
- one separately.
-
- In addition to the converters, the package includes some simple tools
- for manipulating the portable formats.
-
- The package is broken up into four parts. First is PBM, for bitmaps (1
- bit per pixel). Then there is PGM, for grayscale images. Next is PPM,
- for full-color images. Last, there is PNM, which does content-independent
- manipulations on any of the three internal formats, and also handles
- external formats that have multiple types.
-
- The parts are upwards compatible: PGM reads both PGM and PBM files and
- writes PGM; PPM reads all three and writes PPM; and PNM reads all three
- and writes, usually, the same type as it read. Whenever PNM makes an
- exception and "promotes" a file to a higher format, it lets you know.
-
- I've tested this stuff under SysV and BSD, on Sun 3's 4's and 386's and
- Sequents and Vaxen and HPs, with cc and gcc. Nevertheless, I'm sure bugs
- remain, and portability to systems like Amigas and IBM compatibles is
- an interesting question. Feedback is welcome; send bug reports,
- enhancements, etc. to this address:
-
- jef@well.sf.ca.us
- {apple, ucbvax}!well!jef
-
- When sending bug reports, always include the output from running any
- PBMPLUS program with the -version flag. Also include the type of
- system you are on, what compiler you used, and whether you are using
- Makefiles or Imakefiles. I try to respond to bug reports and enhancements
- promptly; say, within a week.
-
- Finally, if you have access to Usenet, there's a newsgroup called
- alt.graphics.pixutils which is specifically for discussion of image
- conversion and editing packages such as PBMPLUS. Posting stuff there
- is even better than mailing it to me, since it lets other people help
- out with the answers.
- -----
- #! /bin/sh
- # This is a shell archive, meaning:
- # 1. Remove everything above the #! /bin/sh line.
- # 2. Save the resulting text in a file.
- # 3. Execute the file with /bin/sh (not csh) to create the files:
- # README
- # CHANGES
- # TODO
- # FORMATS
- # OTHER.SYSTEMS
- # Imakefile
- # Makefile
- # pbmplus.h
- # version.h
- # compat.csh
- # compat.ksh
- # magic
- # This archive created: Fri Sep 27 17:50:01 1991
- # By: Jef Poskanzer (Acme Software)
- export PATH; PATH=/bin:$PATH
- echo shar: extracting "'README'" '(15344 characters)'
- if test -f 'README'
- then
- echo shar: will not over-write existing file "'README'"
- else
- sed 's/^X//' << \SHAR_EOF > 'README'
- X Extended Portable Bitmap Toolkit
- X Distribution of 27sep91
- X Previous distribution 05feb91
- X
- X
- XPBMPLUS is a toolkit for converting various image formats to and from
- Xportable formats, and therefore to and from each other. The idea is,
- Xif you want to convert among N image formats, you only need 2*N
- Xconversion filters, instead of the N^2 you would need if you wrote each
- Xone separately.
- X
- XIn addition to the converters, the package includes some simple tools
- Xfor manipulating the portable formats.
- X
- XThe package is broken up into four parts. First is PBM, for bitmaps (1
- Xbit per pixel). Then there is PGM, for grayscale images. Next is PPM,
- Xfor full-color images. Last, there is PNM, which does content-independent
- Xmanipulations on any of the three internal formats, and also handles
- Xexternal formats that have multiple types.
- X
- XThe parts are upwards compatible: PGM reads both PGM and PBM files and
- Xwrites PGM; PPM reads all three and writes PPM; and PNM reads all three
- Xand writes, usually, the same type as it read. Whenever PNM makes an
- Xexception and "promotes" a file to a higher format, it lets you know.
- X
- X
- XINSTALLATION
- X
- X Unpack the files.
- X Decide whether you want to use Imakefiles or Makefiles. If you want
- X to use Makefiles:
- X
- X Edit the top-level Makefile, find each line with the string
- X "CONFIGURE", and follow the directions for setting configuration
- X options.
- X Likewise edit pbmplus.h.
- X If you are using gnu make, you have to edit *all* the Makefiles
- X and remove all the imake stuff at the ends, otherwise gnu make
- X will overwrite the Makefiles.
- X Make.
- X When you're happy that things compiled ok, make install.
- X
- X The Imakefiles are pretty minimal, but if you want to use them anyway:
- X
- X Edit pbmplus.h, find each line with the string "CONFIGURE", and
- X follow the directions for setting configuration options.
- X Save the original Makefiles, in case you later want to switch back
- X to using them.
- X The usual X11 sequence of xmkmf, make Makefiles, make depend, then
- X make should work.
- X When you're happy that things compiled ok, make install and
- X make install.man.
- X
- XAfter installing the manual pages, you may want to create the "whatis"
- Xfile by doing a catman -w -M <directory>, or whatever the equivalent is
- Xon your system.
- X
- X
- XSUPPORT
- X
- XI've tested this stuff under SysV and BSD, on Sun 3's 4's and 386's and
- XSequents and Vaxen and HPs, with cc and gcc. Nevertheless, I'm sure bugs
- Xremain, and portability to systems like Amigas and IBM compatibles is
- Xan interesting question. Feedback is welcome; send bug reports,
- Xenhancements, etc. to this address:
- X
- X jef@well.sf.ca.us
- X {apple, ucbvax}!well!jef
- X
- XWhen sending bug reports, always include the output from running any
- XPBMPLUS program with the -version flag. Also include the type of
- Xsystem you are on, what compiler you used, and whether you are using
- XMakefiles or Imakefiles. I try to respond to bug reports and enhancements
- Xpromptly; say, within a week.
- X
- XAlso, if there is a new format or feature you would like to have added
- Xto the package, feel free to drop me a line. If it's a format, include
- Xwhatever documentation you have, and if possible a uuencoded sample.
- XMy response time will depend on how busy I am, and how easy the job
- Xlooks. If you need it right away, or it's a complicated job, you might
- Xconsider paying me; lately, that's how a lot of work on the package has
- Xgotten done.
- X
- XFinally, if you have access to Usenet, there's a newsgroup called
- Xalt.graphics.pixutils which is specifically for discussion of image
- Xconversion and editing packages such as PBMPLUS. Posting stuff there
- Xis even better than mailing it to me, since it lets other people help
- Xout with the answers.
- X
- X
- XHOW TO FIND THE RIGHT CONVERTER
- X
- XSome people get confused by all the different names. If you want to
- Xconvert a pbm file to a Sun raster file, is it pbmtorast, pgmtorast,
- Xppmtorast, or pnmtorast? In this case some of the confusion might be
- Xbecause previous versions of the package did in fact have both
- Xpbmtorast and ppmtorast. But mostly it's just too many different
- Xthings to hold in your short term memory. Fine, so don't even try to
- Xremember what's what. That's what computers are for. Unix, at least
- XBSD Unix, has this great indexing feature on the "man" program. You
- Xsay "man -k <keyword>" and it gives you all the one-line descriptions
- Xwith that keyword in them. All the PBMPLUS man pages have nice useful
- Xone-line descriptions, that mention all the relevant keywords. Try it,
- Xyou'll like it.
- X
- X
- XCOPYRIGHTS
- X
- XAll the software in this package, whether by me or by a contributer,
- Xhas a copyright similar to this one:
- X
- X Permission to use, copy, modify, and distribute this software and its
- X documentation for any purpose and without fee is hereby granted, provided
- X that the above copyright notice appear in all copies and that both that
- X copyright notice and this permission notice appear in supporting
- X documentation. This software is provided "as is" without express or
- X implied warranty.
- X
- XMany people get confused by this legalese, especially the part about
- X"without fee". Does this mean you can't charge for any product that
- Xuses PBMPLUS? No. All it means is that you don't have to pay me.
- XYou can do what you want with this software. Build it into your
- Xpackage, steal code from it, whatever. Just be sure to let people
- Xknow where it came from.
- X
- X
- XCONTENTS
- X
- XFiles in pbmplus.shar:
- X
- X README this
- X CHANGES list of changes between the various versions of PBM
- X TODO list of things still to be done
- X FORMATS list of the formats supported
- X OTHER.SYSTEMS list of other free image-processing software
- X Makefile guess
- X Imakefile for X11-type installations
- X pbmplus.h header file for PBM, PGM, PPM, and PNM
- X
- X compat.csh csh script for compatibility with old versions
- X compat.ksh ksh script for compatibility with old versions
- X magic additions for /etc/magic to recognize some image formats
- X
- XFiles in pbm.shar?:
- X
- X Makefile guess
- X Imakefile for X11-type installations
- X
- X atktopbm.c convert Andrew Toolkit raster object to portable bitmap
- X brushtopbm.c convert Xerox doodle brushes to portable bitmap
- X cmuwmtopbm.c convert CMU window manager format to portable bitmap
- X g3topbm.c convert Group 3 FAX to portable bitmap
- X icontopbm.c convert Sun icon to portable bitmap
- X gemtopbm.c convert GEM .img format to portable bitmap
- X macptopbm.c convert MacPaint to portable bitmap
- X mgrtopbm.c convert MGR format to portable bitmap
- X pi3topbm.c convert Atari Degas .pi3 to portable bitmap
- X xbmtopbm.c convert X10 or X11 bitmap to portable bitmap
- X ybmtopbm.c convert Bennet Yee "face" file into portable bitmap
- X
- X pbmto10x.c convert portable bitmap to Gemini 10x printer graphics
- X pbmtoascii.c convert portable bitmap to ASCII graphic form
- X pbmtoatk.c convert portable bitmap to Andrew Toolkit raster object
- X pbmtobbnbg.c convert portable bitmap to BBN BitGraph graphics
- X pbmtocmuwm.c convert portable bitmap to CMU window manager format
- X pbmtoepson.c convert portable bitmap to Epson printer graphics
- X pbmtog3.c convert portable bitmap to Group 3 FAX
- X pbmtogem.c convert portable bitmap into GEM .img file
- X pbmtogo.c convert portable bitmap to GraphOn graphics
- X pbmtoicon.c convert portable bitmap to Sun icon
- X pbmtolj.c convert portable bitmap to HP LaserJet graphics
- X pbmtomacp.c convert portable bitmap to MacPaint
- X pbmtomgr.c convert portable bitmap to MGR format
- X pbmtopi3.c convert portable bitmap to Atari Degas .pi3
- X pbmtoplot.c convert portable bitmap into Unix plot(5) file
- X pbmtoptx.c convert portable bitmap to Printronix graphics
- X pbmtoxbm.c convert portable bitmap to X11 bitmap
- X pbmtox10bm.c convert portable bitmap to X10 bitmap
- X pbmtoybm.c convert portable bitmap into Bennet Yee "face" file
- X pbmtozinc.c convert portable bitmap to Zinc Interface Library icon
- X
- X pbmlife.c apply Conway's rules of Life to a portable bitmap
- X pbmmake.c create a blank bitmap of a specified size
- X pbmmask.c create a mask bitmap from a regular bitmap
- X pbmreduce.c reduce a portable bitmap N times, using Floyd-Steinberg
- X pbmtext.c render text into a bitmap
- X pbmupc.c create a Universal Product Code bitmap
- X
- X libpbm[1-5].c a few utility routines
- X pbmmerge.c merge wrapper routine
- X pbm.h header file for libpbm
- X pbmfont.h header file for font routines in libpbm
- X libpbm.h internal header file for libpbm
- X g3.h definitions for Group 3 FAX
- X macp.h definitions for MacPaint files
- X bitreverse.h useful include file
- X *.1 manual entries for all of the tools
- X pbm.5 manual entry for the pbm format
- X libpbm.3 manual entry for the pbm library
- X
- XFiles in pgm.shar?:
- X
- X Makefile guess
- X Imakefile for X11-type installations
- X
- X fitstopgm.c convert FITS format to portable graymap
- X fstopgm.c convert Usenix FaceSaver(tm) format to portable graymap
- X hipstopgm.c convert HIPS format to portable graymap
- X lispmtopgm.c convert a Lisp Machine bitmap file into pgm format
- X psidtopgm.c convert PostScript "image" data to portable graymap
- X rawtopgm.c convert raw grayscale bytes to portable graymap
- X
- X pgmtofits.c convert portable graymap to FITS format
- X pgmtofs.c convert portable graymap to Usenix FaceSaver(tm) format
- X pgmtolispm.c convert a portable graymap into Lisp Machine format
- X pgmtopbm.c convert portable graymap to portable bitmap
- X
- X pgmbentley.c Bentleyize a portable graymap
- X pgmedge.c edge-detect a portable graymap
- X pgmenhance.c edge-enhance a portable graymap
- X pgmhist.c print a histogram of the values in a portable graymap
- X pgmnorm.c normalize contrast in a portable graymap
- X pgmoil.c turn a portable graymap into an oil painting
- X pgmramp.c generate a grayscale ramp
- X pgmtexture.c calculate textural features on a portable graymap
- X
- X libpgm[1-3].c a few utility routines
- X pgmmerge.c merge wrapper routine
- X pgm.h header file for libpgm
- X libpgm.h internal header file for libpgm
- X dithers.h useful include file
- X *.1 manual entries for all of the tools
- X pgm.5 manual entry for the pgm format
- X libpgm.3 manual entry for the pgm library
- X
- XFiles in ppm.shar?:
- X
- X Makefile guess
- X Imakefile for X11-type installations
- X
- X giftoppm.c convert GIF to portable pixmap
- X gouldtoppm.c convert Gould scanner file to portable pixmap
- X ilbmtoppm.c convert IFF ILBM to portable pixmap
- X imgtoppm.c convert Img-whatnot to portable pixmap
- X mtvtoppm.c convert MTV ray-tracer output to portable pixmap
- X pcxtoppm.c convert PC Paintbrush format to portable pixmap
- X pgmtoppm.c colorize a portable graymap into a portable pixmap
- X pi1toppm.c convert Atari Degas .pi1 to portable pixmap
- X picttoppm.c convert Macintosh PICT to portable pixmap
- X pjtoppm.c convert HP PaintJet file to portable pixmap
- X qrttoppm.c convert QRT ray-tracer output to portable pixmap
- X rawtoppm.c convert raw RGB bytes to portable pixmap
- X rgb3toppm.c combine three portable graymaps into one portable pixmap
- X spctoppm.c convert Atari compressed Spectrum to portable pixmap
- X sputoppm.c convert Atari uncompressed Spectrum to portable pixmap
- X tgatoppm.c convert TrueVision Targa file to portable pixmap
- X ximtoppm.c convert Xim to portable pixmap
- X xpmtoppm.c convert XPM format to portable pixmap
- X yuvtoppm.c convert Abekas YUV format to portable pixmap
- X
- X ppmtogif.c convert portable pixmap to GIF
- X ppmtoicr.c convert portable pixmap to NCSA ICR graphics
- X ppmtoilbm.c convert portable pixmap to IFF ILBM
- X ppmtopcx.c convert portable pixmap to PC Paintbrush format
- X ppmtopgm.c convert portable pixmap to portable graymap
- X ppmtopi1.c convert portable pixmap to Atari Degas .pi1
- X ppmtopict.c convert portable pixmap to Macintosh PICT
- X ppmtopj.c convert portable pixmap to HP PaintJet file
- X ppmtopuzz.c convert portable pixmap to X11 "puzzle" file
- X ppmtorgb3.c separate a portable pixmap into three portable graymaps
- X ppmtosixel.c convert portable pixmap to DEC sixel format
- X ppmtotga.c convert portable pixmap to TrueVision Targa file
- X ppmtouil.c convert portable pixmap to Motif UIL icon file
- X ppmtoxpm.c convert portable pixmap to XPM format
- X ppmtoyuv.c convert portable pixmap to Abekas YUV format
- X
- X ppmdither.c ordered dither for color images
- X ppmhist.c print a histogram of a portable pixmap
- X ppmpat.c create a pretty pixmap
- X ppmquant.c quantize colors down to a specified number
- X ppmquantall script to run ppmquant on a set of pixmaps
- X ppmrelief.c run a Laplacian Relief filter on a portable pixmap
- X
- X libppm[1-5].c a few utility routines
- X ppmmerge.c merge wrapper routine
- X ppm.h header file for libppm
- X ppmcmap.h header file for colormap routines in libppm
- X ppmdraw.h header file for simple drawing routines in libppm
- X libppm.h internal header file for libppm
- X tga.h definitions for TrueVision Targa files
- X xim.h definitions for Xim files
- X *.1 manual entries for all of the tools
- X ppm.5 manual entry for the ppm format
- X libppm.3 manual entry for the ppm library
- X
- XFiles in pnm.shar?:
- X
- X Makefile guess
- X Imakefile for X11-type installations
- X
- X anytopnm script to attempt to convert any format to P?M
- X rasttopnm.c convert Sun raster file to portable anymap
- X tifftopnm.c convert TIFF file to portable anymap
- X xwdtopnm.c convert X10 or X11 window dump to portable anymap
- X
- X pnmtops.c convert portable anymap to PostScript
- X pnmtorast.c convert portable anymap to Sun raster file
- X pnmtotiff.c convert portable anymap to TIFF file
- X pnmtoxwd.c convert portable anymap to X11 window dump
- X
- X pnmarith.c perform arithmetic on two portable anymaps
- X pnmcat.c concatenate portable anymaps
- X pnmconvol.c general MxN convolution on a portable anymap
- X pnmcrop.c crop all like-colored borders off a portable anymap
- X pnmcut.c select a rectangular region from a portable anymap
- X pnmdepth.c change the maxval in a portable anymap
- X pnmenlarge.c enlarge a portable anymap N times
- X pnmfile.c describe a portable anymap
- X pnmflip.c perform one or more flip operations on a portable anymap
- X pnmgamma.c perform gamma correction on a portable anymap
- X pnmindex script to build a visual index of a bunch of anymaps
- X pnminvert.c invert a portable anymap
- X pnmmargin script to add a margin to a portable anymap
- X pnmnoraw.c force a portable anymap into ASCII format
- X pnmpaste.c paste a rectangle into a portable anymap
- X pnmrotate.c rotate a portable anymap
- X pnmscale.c scale a portable anymap
- X pnmshear.c shear a portable anymap
- X pnmsmooth script that uses pnmconvol to smooth a anymap
- X pnmtile.c replicate a portable anymap into a specified size
- X
- X libpnm[1-4].c a few utility routines
- X pnmmerge.c merge wrapper routine
- X pnm.h header file for libpnm
- X rast.h definitions for Sun raster files
- X x10wd.h definitions for X10 window dumps
- X x11wd.h definitions for X11 window dumps
- X *.1 manual entries for all of the tools
- X pnm.5 manual entry for the pnm format
- X libpnm.3 manual entry for the pnm library
- SHAR_EOF
- if test 15344 -ne "`wc -c < 'README'`"
- then
- echo shar: error transmitting "'README'" '(should have been 15344 characters)'
- fi
- fi # end of overwriting check
- echo shar: extracting "'CHANGES'" '(10555 characters)'
- if test -f 'CHANGES'
- then
- echo shar: will not over-write existing file "'CHANGES'"
- else
- sed 's/^X//' << \SHAR_EOF > 'CHANGES'
- XChanges during the extended beta test period, starting on 15jan91:
- X
- X Lots of fixes from: Anthony A. Datri, Arthur David Olson, David Brooks,
- X David Elliott, Doug Claar, Duncan Sinclair, Francois Pinard, Gerard
- X Leurs, Jim Hanko, Ken Laprade, Klaus U. Schallhorn, Markus Bolz, Mike
- X Hench, Philip Gladstone, R C Smith, Selden E. Ball, Jr., Stephen Uitti,
- X Steve Allen, Tom Lane, update.kpj-jaakkola@athena.dsv.su.se,
- X Charles Karney, Unmesh Agarwala, Ed Pendzik, Juha Sarlin, Tom Tulinsky,
- X Phillip Smith, Lai-King Mau, David Koblas, Mark Donovan.
- X Added a global -version flag.
- X Added bunches of statics and prototypes. Now compiles with zero
- X warnings under gcc -ansi -pedantic.
- X Changed #ifdef __STDC__ to #if __STDC__, since some non-compliant
- X compilers define it as 0.
- X Changed pm_message and pm_error to be varargs routines. Added a
- X portable version of vfprintf for those systems which don't have it.
- X Removed the option of not compiling the pgm and ppm parts. Very few
- X people used it, and it added amazing complexity to the pnm programs,
- X turning them into maintenance nightmares.
- X Merged pbmpaste into pnmpaste.
- X Merged pgmtops and ppmtops into pnmtops.
- X Added auto-scaling and dpi / page size flags to pnmtops.
- X Changed the interpretation of bits in pbmlife to conform with other
- X tools.
- X Changed xwdtopnm to ignore the pixel number in the xwd color structure.
- X Added a -pseudodepth flag to pnmtoxwd.
- X Updated tifftopnm for libtiff 2.4.
- X Added many option flags to pnmtotiff. (J.T. Conklin)
- X Added support for X11R5's new color specifiers rgb: and rgbi:.
- X Added pgmtexture. (James Darrell McCauley)
- X Added ppmtopj, pjtoppm, and ppmdither. (Christos Zoulas)
- X Added ppmtotga. (Mark Shand)
- X Added ppmtosixel. (Rick Vinci)
- X Added pbmtoatk and atktopbm. (Bill Janssen)
- X Added ppmtoyuv and yuvtoppm. (Marc Boucher)
- X Fixes to picttoppm. (George Phillips)
- X Added 24-bit support to ilbmtoppm. (Mark Thompson)
- X
- XChanges since the X.V11R4 / comp.sources.misc distribution of 22nov89:
- X
- X Added pgmramp, pgmedge, pgmtoppm, rgb3toppm, ppmtoxpm, pnmgamma,
- X ximtoppm, pgmtofs, picttoppm, ppmtopict, ppmquantall, anytopnm,
- X pi1toppm, ppmtopi1, sputoppm, spctoppm, pbmto10x, ppmtoicr, ppmmake,
- X xpmtoppm, ppmtopuzz, ppmtouil, ybmtopbm, pbmtoybm, lispmtopgm,
- X pgmtolispm, pbmtogem, pi3topbm, pbmtopi3, pbmtoepson, pbmtoplot,
- X pbmtozinc, pbmtext, pnmnoraw, pnmmargin, pnmfile, pnmindex,
- X ppmtorgb3, gouldtoppm, pgmbentley, pgmoil, ppmrelief, pnmtotiff,
- X ppmtopcx.
- X Merged some filters:
- X rasttopbm and rasttoppm into rasttopnm;
- X pbmtorast and ppmtorast into pnmtorast;
- X xwdtopbm and xwdtoppm into xwdtopnm;
- X pbmtoxwd and ppmtoxwd into pnmtoxwd.
- X Promoted some filters:
- X pcxtopbm to pcxtoppm;
- X ppmarith to pnmarith;
- X ppmconvol to pnmconvol;
- X ppmcscale to pnmdepth;
- X ppmrotate to pnmrotate;
- X ppmscale to pnmscale;
- X ppmshear to pnmshear;
- X ppmsmooth to pnmsmooth;
- X tifftopgm to tifftopnm - new version based on Sam Leffler's libtiff.
- X Bugfixes to pbmtoicon, ppmtops.
- X The Makefiles now have a "merge" option.
- X All flags are now case-insensitive.
- X Added $(MAKE) stuff to Makefile.
- X Changed pnmsmooth from a csh script to a sh script.
- X Made macro use in pbmtox10bm and pbmtoxbm more portable.
- X Moved compataliases to compat.csh, and added compat.ksh.
- X Made ppmtoilbm less Amiga-specific.
- X Added -headerskip and -rowskip flags to rawtopgm.
- X Enhanced rasttopnm to interpret 8-bit rasters with no colormap as grayscale.
- X Changed sscanf %g to %f - some systems can't handle %g on input.
- X Added -expand flag to pbmmask.
- X Speedup to pnmflip - don't buffer if possible.
- X Added color-name-to-value routine to ppm - uses X11's rgb.txt if present.
- X Updated Imakefile support to reflect X.V11R4.
- X Removed picttopbm.
- X Improved pnmcut argument syntax so that negative coords work like pnmpaste.
- X Added "magic" file, for use with the "file" program.
- X 40% speedup for pgmnorm from Robert Stockton (rgs@cs.cmu.edu).
- X Fixed long-standing bug involving colormaps on SPARCstations when
- X compiled with gcc -- had to do with passing structs by value.
- X Removed the -x flag from pnmtorast -- it's not really needed.
- X Fixed subtle bug in the pnm reading code that caused pnmcat to blow
- X it on images that differed greatly in width or height.
- X New version of giftoppm that handles the GIF89a standard, and doesn't
- X use fseek.
- X Fixed fitstopgm to handle three-axis images, such as the Hubble pix.
- X Xwdtopnm and pnmtoxwd finally handle byte-order properly.
- X Added -xysize flag to pnmscale.
- X Added conditional ANSI function prototypes to library routines.
- X Added -noantialias flag to pnmrotate and pnmshear.
- X Removed the TIPS file. No one ever sent in any new tips, so I just
- X moved the few I had into the relevant man pages. That's probably
- X where they belonged in the first place.
- X Added justification flags to pnmcat.
- X Added -map flag to ppmquant - user-specifiable colormap. Also, the
- X Floyd-Steinberg error diffusion finally works right.
- X Added -map flag to pgmtoppm.
- X Added DirectColor support to xwdtopnm and pnmtoxwd.
- X Speedup to pgmtolj from Arthur David Olson: avoid sending whitespace.
- X Fix to pbmtogo from Bo Thide': 2D compression now works.
- X
- XPatch 1 to the X.V11R4 / comp.sources.misc distribution of 22nov89:
- X
- X Fixed bug in pgmtops -rle.
- X
- XChanges since the alt.sources distribution of 13sep89:
- X
- X Small corrections to ppmtorast, pgmtops.
- X Moved pbm/tifftopbm to pgm/tifftopgm - it now handles grayscale TIFF files.
- X Fixed tifftopgm to handle non-native byte order.
- X Changes to tifftopgm to handle bogus AppleScan TIFF files, to have
- X better command syntax, and to use stdio.
- X Optimizations to xbmtopbm, pbmtoxbm, and pbmtox10bm, courtesy of
- X Juha Sarlin, to make them go about three times as fast.
- X Optimization to pgmtops and ppmtops to make them go three times as fast.
- X Optimization to pnmcrop.
- X Added PBMPLUS_BROKENPUTC defines in pbmplus.h to handle systems (such as
- X ULTRIX) which have broken putc() macros.
- X Rewrote ppmscale, pnmcat, and pgmhist to operate line-by-line, instead
- X of reading in the whole image.
- X Rewrote pnmflip to keep only one copy of the image in memory.
- X Added pgmtofits, courtesy of Wilson H. Bent, plus bugfixes to fitstopgm
- X and a patch to giftoppm to handle black&white GIF files.
- X Added picttopbm and rawtopgm.
- X Fixes to xwdtoppm and ppmtoxwd so they compile with SunOS cc as well as gcc.
- X Another small change to ppmtoxwd having to do with colormap size.
- X Changed macptopbm's -headersize flag to be -extraskip.
- X Changed tgatoppm to read color values as BGRA instead of ARGB; the Targa
- X documentation is apparently wrong about the order.
- X Some changes to the Makefiles, partially to work around bugs in gnumake.
- X Got g3topbm working, and added pbmtog3, courtesy of Paul Haeberli.
- X Added some pixrect work-alike code so that rasttopbm, pbmtorast, rasttoppm,
- X and ppmtorast can be used on non-Sun systems. This also provides a
- X final solution to the persistent byte- and bit-order problems on 386's.
- X Moved the SYSV-checking #ifdefs to *after* the include of pbm.h, which
- X defines SYSV.
- X Made all the #else's and #endif's ANSI-compliant.
- X Added manual pages for libpbm, libpgm, libppm, and libpnm, courtesy
- X of Tony Hansen.
- X Changed man page installation so that pages from different sections
- X can go in different directories.
- X Fixed Imakefiles.
- X
- XChanges since the expo.lcs.mit.edu FTP distribution of 06sep89:
- X
- X Added #ifdefs to pnm/libpnm3.c to allow the PBM-PNM-only configuration.
- X Small corrections to TIPS, pnm/Makefile, pnm/Imakefile, ppm/ppmrotate.1,
- X ppm/ppmshear.1, ppm/ppmtoilbm.c, pbm/xwdtopbm.c, ppm/xwdtoppm.c,
- X ppm/ppmtoxwd.c, ppm/ppmtoxwd.1, pbm/x11wd.h.
- X
- XChanges since the comp.sources.misc distribution of 31oct88:
- X
- X Added pbmreduce, pbmlife, pbmmask, and pbmupc.
- X Added gemtopbm, tifftopbm, pcxtopbm, pbmtogo, mgrtopbm, pbmtomgr,
- X cmuwmtopbm, pbmtocmuwm, g3topbm, and pbmtobg.
- X Minor bugfix to pbmtolj.
- X Slight restructuring of most of the programs to use vastly less memory.
- X Various other minor optimizations.
- X Fixed pbmtorast and rasttopbm to handle byte-swapped big-endian 386 boxes.
- X Slight changes to argument syntax of pbmcrop, pbmmake, pbmreduce.
- X Moved to the new PGM package: pbmtops (which now produces Conforming PS).
- X Moved to the new PPM package: giftopbm.
- X Moved to the new PNM package: pbmcrop pbmcut pbmenlarge pbminvert.
- X Consolidated into a single pnmflip tool: pbmfliplr pbmfliptb pbmtrnspos.
- X Consolidated into a single pnmcat tool: pbmcatlr pbmcattb.
- X Added compataliases script for upward compatability with changed tools.
- X Removed xxxtopbm.
- X Added a -headersize flag to macptopbm, to help get around annoying
- X problems in MacPaint file format.
- X Added the RAWBITS compilation-time option, to use a more compact and
- X much faster (but less portable) external format.
- X Removed the CBM format - use compress(1) and / or RAWBITS instead.
- X Pbmpaste (and the new pnmpaste) now accepts negative x and y coords,
- X which are interpreted relative to the right and bottom sides.
- X Changed all programs to accept a "-" file argument as meaning standard
- X input.
- X Removed pbmtox10wd, since it was never very useful (X10 doesn't have xwud).
- X Added Imakefiles, for X11 types to use.
- X
- XChanges since the X.V11R3 distribution of 31aug88:
- X
- X The cbm format has been revised to support run-length encoding.
- X Pbmtops now does run-length encoding.
- X
- XMajor changes since the X.V11R2 distribution of 28mar88:
- X
- X The pbm format now has a "magic number".
- X New conversion filters: brushtopbm, giftopbm, pbmtolj, pbmtomacp,
- X pbmtoxwd, and pbmtox10wd.
- X Icontopbm converter has a better parser -- it knows to skip over
- X any extraneous comments at the beginning of the icon file.
- X Pbmtops generates a different PostScript wrapper program -- it should
- X handle huge bitmaps better.
- X Xwdtopbm now handles byte-swapping correctly.
- X Pbmmake takes a flag to specify the color of the new bitmap.
- X Pbmpaste now implements 'or', 'and', and 'xor' operations as well
- X as the default 'replace'.
- SHAR_EOF
- if test 10555 -ne "`wc -c < 'CHANGES'`"
- then
- echo shar: error transmitting "'CHANGES'" '(should have been 10555 characters)'
- fi
- fi # end of overwriting check
- echo shar: extracting "'TODO'" '(827 characters)'
- if test -f 'TODO'
- then
- echo shar: will not over-write existing file "'TODO'"
- else
- sed 's/^X//' << \SHAR_EOF > 'TODO'
- XThings still to be done, in approximate order of likelihood:
- X
- X
- XThe hash table in ppmquant is not really the right data structure.
- X
- XImakefile fixes from David Lawrence.
- X
- XVMS fixes from Terry Poot.
- X
- XAdd IBM, Mac, and Amiga stuff to OTHER.SYSTEMS file.
- X
- Xhipstopgm should have a -image flag like fitstopgm and giftoppm.
- X
- XAdd ppmtocmyk4.
- X
- XUpgrade xpmtoppm and ppmtoxpm to handle XPM2.
- X
- XFigure out why compiling pnmconvol makes gcc die on some systems.
- X
- XConvert to line-by-line mode:
- Xpbmtext.c pbmtoascii.c pbmtoepson.c pbmtomacp.c pbmtoplot.c
- X
- XThe Converter Generator reorganization: all filters become three library
- Xroutines, one to initialize, one to handle each line, and one to finish off.
- XThis will make it possible to generate self-contained pipelines on demand,
- Xand they should run substantially faster without all that I/O.
- SHAR_EOF
- if test 827 -ne "`wc -c < 'TODO'`"
- then
- echo shar: error transmitting "'TODO'" '(should have been 827 characters)'
- fi
- fi # end of overwriting check
- echo shar: extracting "'FORMATS'" '(2092 characters)'
- if test -f 'FORMATS'
- then
- echo shar: will not over-write existing file "'FORMATS'"
- else
- sed 's/^X//' << \SHAR_EOF > 'FORMATS'
- XPBM handles the following black&white formats:
- X
- X Sun icon file reading writing
- X X10 and X11 bitmap file reading writing
- X MacPaint reading writing
- X CMU window manager format reading writing
- X MGR format reading writing
- X Group 3 FAX reading writing
- X GEM .img format reading writing
- X Bennet Yee's "face" format reading writing
- X Atari Degas .pi3 format reading writing
- X Andrew Toolkit raster object reading writing
- X Xerox doodle brushes reading
- X ASCII graphics writing
- X HP LaserJet format writing
- X GraphOn graphics writing
- X BBN BitGraph graphics writing
- X Printronix format writing
- X Gemini 10x printer format writing
- X Epson printer format writing
- X Unix plot(5) file writing
- X Zinc Interface Library icon writing
- X
- XPGM handles the following grayscale formats:
- X
- X Usenix FaceSaver(tm) file reading writing
- X FITS reading writing
- X Lisp Machine bit-array-file reading writing
- X raw grayscale bytes reading
- X HIPS reading
- X PostScript "image" data reading
- X
- XPPM handles the following color formats:
- X
- X GIF reading writing
- X IFF ILBM reading writing
- X PICT reading writing
- X Atari Degas .pi1 format reading writing
- X XPM (X Window System ASCII pixmaps) reading writing
- X PC Paintbrush .pcx format reading writing
- X TrueVision Targa file reading writing
- X HP PaintJet format reading writing
- X Abekas YUV format reading writing
- X MTV/PRT ray-tracer output reading
- X QRT ray-tracer output reading
- X Img-whatnot file reading
- X Xim file reading
- X Atari uncompressed Spectrum reading
- X Atari compressed Spectrum reading
- X NCSA Interactive Color Raster writing
- X X11 "puzzle" file writing
- X Motif UIL icon file writing
- X DEC sixel format writing
- X
- XPNM handles the following multi-type formats:
- X
- X Sun raster file reading writing
- X TIFF reading writing
- X X11 window dump file reading writing
- X X10 window dump file reading
- X PostScript writing
- SHAR_EOF
- if test 2092 -ne "`wc -c < 'FORMATS'`"
- then
- echo shar: error transmitting "'FORMATS'" '(should have been 2092 characters)'
- fi
- fi # end of overwriting check
- echo shar: extracting "'OTHER.SYSTEMS'" '(3959 characters)'
- if test -f 'OTHER.SYSTEMS'
- then
- echo shar: will not over-write existing file "'OTHER.SYSTEMS'"
- else
- sed 's/^X//' << \SHAR_EOF > 'OTHER.SYSTEMS'
- X List of Other Free Image-Processing Software
- X
- X IM Raster Toolkit, by Alan Paeth (awpaeth@watcgl.uwaterloo.ca).
- X Provides a portable and efficient format and related toolkit. The
- X format is versatile in supporting pixels of arbitrary channels,
- X components, and bit precisions while allowing compression and machine
- X byte-order independence. The kit contains more than 50 tools with
- X extensive support of image manipulation, digital halftoning and format
- X conversion. Previously distributed on tape c/o the University of
- X Waterloo, an FTP version will appear someday.
- X
- X Utah RLE Toolkit. Conversion and manipulation package, similar to
- X PBMPLUS. Available via FTP as cs.utah.edu:pub/toolkit-2.0.tar.Z and
- X ucsd.edu:graphics/utah-raster-toolkit.tar.Z.
- X
- X Fuzzy Pixmap Manipulation, by Michael Mauldin <mlm@nl.cs.cmu.edu>.
- X Conversion and manipulation package, similar to PBMPLUS. Version 1.0
- X available via FTP as nl.cs.cmu.edu:/usr/mlm/ftp/fbm.tar.Z,
- X uunet.uu.net:pub/fbm.tar.Z, and ucsd.edu:graphics/fbm.tar.Z.
- X
- X Img Software Set, by Paul Raveling <raveling@venera.isi.edu>. Reads and
- X writes its own image format, displays on an X11 screen, and does some
- X image manipulations. Version 1.3 is available via FTP as
- X export.lcs.mit.edu:contrib/img_1.3.tar.Z, and
- X venera.isi.edu:pub/img_1.3.tar.Z along with a large collection of color
- X images.
- X
- X Xim, by Philip R. Thompson. Reads and writes its own image format,
- X displays on an X11 screen, and does some image manipulations.
- X Available in your nearest X11R4 source tree as contrib/clients/xim.
- X A more recent version is available via ftp from video.mit.edu. It uses
- X x11r4 and the OSF/Motif toolkit to provide basic interactive image
- X manipulation and reads/writes GIF, xwd, xbm, tiff, rle, xim, and other
- X formats.
- X
- X xloadimage, by Jim Frost <madd@std.com>. Reads in images in various
- X formats and displays them on an X11 screen. Available via FTP as
- X export.lcs.mit.edu:contrib/xloadimage*, and in your nearest comp.sources.x
- X archive.
- X
- X TIFF Software, by Sam Leffler <sam@okeeffe.berkeley.edu>. Nice
- X portable library for reading and writing TIFF files, plus a few tools
- X for manipulating them and reading other formats. Available via FTP as
- X ucbvax.berkeley.edu:pub/tiff/*.tar.Z or uunet.uu.net:graphics/tiff.tar.Z
- X
- X ALV, a Sun-specific image toolkit. Version 2.0.6 posted to
- X comp.sources.sun on 11dec89. Also available via email to
- X alv-users-request@cs.bris.ac.uk.
- X
- X popi, an image manipulation language. Version 2.1 posted to
- X comp.sources.misc on 12dec89.
- X
- X ImageMagick, an X11 package for display and interactive manipulation
- X of images. Uses its own format (MIFF), and includes some converters.
- X Available via FTP as export.lcs.mit.edu:contrib/ImageMagick.tar.Z
- X
- X Khoros, a huge (~100 meg) graphical development environment based on
- X X11R4. Khoros components include a visual programming language, code
- X generators for extending the visual language and adding new application
- X packages to the system, an interactive user interface editor, an
- X interactive image display package, an extensive library of image and
- X signal processing routines, and 2D/3D plotting packages. Available via
- X FTP as pprg.unm.edu:pub/khoros/*.
- X
- XDon't forget to set binary mode when you FTP tar files. For you MILNET
- Xfolks who still don't have name servers, the IP addresses are:
- X
- X export.lcs.mit.edu 18.24.0.12
- X ftp.ee.lbl.gov 128.3.112.20
- X cs.utah.edu 128.110.4.21
- X nl.cs.cmu.edu 128.2.222.56
- X venera.isi.edu 128.9.0.32
- X ucbvax.berkeley.edu 128.32.133.1
- X weedeater.math.yale.edu 130.132.23.17
- X freebie.engin.umich.edu 141.212.68.23
- X pprg.eece.unm.edu 129.24.24.10
- X
- XAlso, the newsgroup alt.graphics.pixutils is specifically for discussion
- Xof software like this. You may find useful information there.
- SHAR_EOF
- if test 3959 -ne "`wc -c < 'OTHER.SYSTEMS'`"
- then
- echo shar: error transmitting "'OTHER.SYSTEMS'" '(should have been 3959 characters)'
- fi
- fi # end of overwriting check
- echo shar: extracting "'Imakefile'" '(613 characters)'
- if test -f 'Imakefile'
- then
- echo shar: will not over-write existing file "'Imakefile'"
- else
- sed 's/^X//' << \SHAR_EOF > 'Imakefile'
- X# Imakefile for pbmplus tools.
- X#
- X# Copyright (C) 1989, 1991 by Jef Poskanzer.
- X#
- X# Permission to use, copy, modify, and distribute this software and its
- X# documentation for any purpose and without fee is hereby granted, provided
- X# that the above copyright notice appear in all copies and that both that
- X# copyright notice and this permission notice appear in supporting
- X# documentation. This software is provided "as is" without express or
- X# implied warranty.
- X
- X#define IHaveSubdirs
- X#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
- X
- XSUBDIRS = pbm pgm ppm pnm
- X
- XMakeSubdirs($(SUBDIRS))
- XDependSubdirs($(SUBDIRS))
- SHAR_EOF
- if test 613 -ne "`wc -c < 'Imakefile'`"
- then
- echo shar: error transmitting "'Imakefile'" '(should have been 613 characters)'
- fi
- fi # end of overwriting check
- echo shar: extracting "'Makefile'" '(6032 characters)'
- if test -f 'Makefile'
- then
- echo shar: will not over-write existing file "'Makefile'"
- else
- sed 's/^X//' << \SHAR_EOF > 'Makefile'
- X# Makefile for pbmplus tools.
- X#
- X# Copyright (C) 1989, 1991 by Jef Poskanzer.
- X#
- X# Permission to use, copy, modify, and distribute this software and its
- X# documentation for any purpose and without fee is hereby granted, provided
- X# that the above copyright notice appear in all copies and that both that
- X# copyright notice and this permission notice appear in supporting
- X# documentation. This software is provided "as is" without express or
- X# implied warranty.
- X
- X# CONFIGURE: gcc makes things go faster on some machines, but not everyone
- X# has it. Warning: do not use gcc's -finline-functions or -fstrength-reduce
- X# flags, they can produce incorrect code. (This is with gcc versions 1.35,
- X# 1.36, and 1.37, later versions may fix these bugs.) Also, on some systems
- X# gcc can't compile pnmconvol - dunno why. And on some systems you can't
- X# use the -ansi flag, it gives compilation errors in <math.h>.
- XCC = cc
- X#CC = gcc
- X#CC = gcc -fcombine-regs -fpcc-struct-return
- X#CC = gcc -ansi -pedantic -fcombine-regs -fpcc-struct-return
- X
- X# CONFIGURE: cc flags go here.
- XCFLAGS = -O
- X#CFLAGS = -g
- X#CFLAGS = -g -O
- X
- X# CONFIGURE: ld flags go here. Eunice users may want to use -noshare so that
- X# the binaries can run standalone.
- XLDFLAGS = -s
- X#LDFLAGS =
- X#LDFLAGS = -noshare
- X
- X# CONFIGURE: If you have an X11-style rgb color names file, define its
- X# path here. This is used by PPM to parse color names into rgb values.
- X# If you don't have such a file, comment this out and use the alternative
- X# hex and decimal forms to specify colors (see ppm/pgmtoppm.1 for details).
- XRGBDEF = -DRGB_DB=\"/usr/lib/X11/rgb.txt\"
- X
- X# CONFIGURE: PBMPLUS's support for TIFF files depends on the library from
- X# Sam Leffler's TIFF Software package - see the OTHER.SYSTEMS file for a
- X# full description and access information. To configure PBMPLUS to use the
- X# library: first, if necessary, fetch the TIFF Software, unpack it in a
- X# scratch directory somewhere, and move the libtiff subdirectory right here
- X# into the PBMPLUS top-level directory. Configure and "make" in the
- X# libtiff directory. Yes, you do have to do the TIFF make by hand, the
- X# general PBMPLUS make will *not* make libtiff. Finally, uncomment the
- X# following five definitions.
- X#
- X# Libtiff is pretty good about portability, but there are some machines
- X# it has problems on. If you run into problems, you may wish to contact
- X# Sam directly, at the address listed in the OTHER.SYSTEMS file.
- XTIFFDEF = -DLIBTIFF
- XTIFFINC = -I../libtiff
- XTIFFLIB = ../libtiff/libtiff.a
- XTIFFBINARIES = tifftopnm pnmtotiff
- XTIFFOBJECTS = tifftopnm.o pnmtotiff.o
- X
- X# CONFIGURE: Define the directory that you want the binaries copied to.
- X# If you need scripts and binaries to be in different directories, you
- X# can set that up too.
- XINSTALLBINARIES = /usr/new/pbmplus
- XINSTALLSCRIPTS = $(INSTALLBINARIES)
- X
- X# CONFIGURE: Define the directories that you want the manual sources copied to,
- X# plus the suffix you want them to have.
- XINSTALLMANUALS1 = /usr/man/mann
- XSUFFIXMANUALS1 = n
- XINSTALLMANUALS3 = /usr/man/mann
- XSUFFIXMANUALS3 = n
- XINSTALLMANUALS5 = /usr/man/mann
- XSUFFIXMANUALS5 = n
- X
- X# CONFIGURE: Normally the man pages are installed using "cp". By changing
- X# this define you can use something else, for example a script that calls
- X# compress or pack.
- XMANCP = cp
- X
- X# CONFIGURE: Normally the Makefiles build and install separate binaries for
- X# each program. However, on some systems (especially those without shared
- X# libraries) this can mean a lot of space. In this case you might try
- X# building a "merge" instead. The idea here is to link all the binaries
- X# together into one huge executable, with a tiny dispatch program as the
- X# main. Then the merged binary is installed with file-system links for
- X# each program it includes. The dispatch routine can tell which program
- X# to run by looking at argv[0]. On a Sun3 under SunOS 3.5 the space for
- X# executables went from 2.9 meg to .36 meg.
- X#
- X# Note that if you make a "merge", the executables don't get created
- X# until you do the install.
- Xall: binaries
- Xinstall: install.bin install.man
- X#all: merge
- X#install: install.merge install.man
- X
- X# End of configurable definitions.
- X
- XSHELL = /bin/sh
- XMAKE = make
- XSUBDIRS = pbm pgm ppm pnm
- X
- Xbinaries:
- X for i in $(SUBDIRS) ; do \
- X ( echo $$i ; cd $$i ; $(MAKE) $(MFLAGS) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'RGBDEF=$(RGBDEF)' 'TIFFDEF=$(TIFFDEF)' 'TIFFINC=$(TIFFINC)' 'TIFFLIB=$(TIFFLIB)' 'TIFFBINARIES=$(TIFFBINARIES)' 'TIFFOBJECTS=$(TIFFOBJECTS)' 'LDFLAGS=$(LDFLAGS)' binaries ); \
- X done
- X
- Xmerge:
- X for i in $(SUBDIRS) ; do \
- X ( echo $$i ; cd $$i ; $(MAKE) $(MFLAGS) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'RGBDEF=$(RGBDEF)' 'TIFFDEF=$(TIFFDEF)' 'TIFFINC=$(TIFFINC)' 'TIFFLIB=$(TIFFLIB)' 'TIFFBINARIES=$(TIFFBINARIES)' 'TIFFOBJECTS=$(TIFFOBJECTS)' 'LDFLAGS=$(LDFLAGS)' merge ); \
- X done
- X
- Xinstall.bin:
- X for i in $(SUBDIRS) ; do \
- X ( echo $$i ; cd $$i ; $(MAKE) $(MFLAGS) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'RGBDEF=$(RGBDEF)' 'TIFFDEF=$(TIFFDEF)' 'TIFFINC=$(TIFFINC)' 'TIFFLIB=$(TIFFLIB)' 'TIFFBINARIES=$(TIFFBINARIES)' 'TIFFOBJECTS=$(TIFFOBJECTS)' 'LDFLAGS=$(LDFLAGS)' 'INSTALLBINARIES=$(INSTALLBINARIES)' 'INSTALLSCRIPTS=$(INSTALLSCRIPTS)' install.bin ); \
- X done
- X
- Xinstall.merge:
- X for i in $(SUBDIRS) ; do \
- X ( echo $$i ; cd $$i ; $(MAKE) $(MFLAGS) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'RGBDEF=$(RGBDEF)' 'TIFFDEF=$(TIFFDEF)' 'TIFFINC=$(TIFFINC)' 'TIFFLIB=$(TIFFLIB)' 'TIFFBINARIES=$(TIFFBINARIES)' 'TIFFOBJECTS=$(TIFFOBJECTS)' 'LDFLAGS=$(LDFLAGS)' 'INSTALLBINARIES=$(INSTALLBINARIES)' 'INSTALLSCRIPTS=$(INSTALLSCRIPTS)' install.merge ); \
- X done
- X
- Xinstall.man:
- X for i in $(SUBDIRS) ; do \
- X ( echo $$i ; cd $$i ; $(MAKE) $(MFLAGS) 'TIFFBINARIES=$(TIFFBINARIES)' 'INSTALLMANUALS1=$(INSTALLMANUALS1)' 'SUFFIXMANUALS1=$(SUFFIXMANUALS1)' 'INSTALLMANUALS3=$(INSTALLMANUALS3)' 'SUFFIXMANUALS3=$(SUFFIXMANUALS3)' 'INSTALLMANUALS5=$(INSTALLMANUALS5)' 'SUFFIXMANUALS5=$(SUFFIXMANUALS5)' 'MANCP=$(MANCP)' install.man ); \
- X done
- X
- Xclean:
- X -rm -f *.shar *.shar? art.*
- X for i in $(SUBDIRS) ; do \
- X ( echo $$i ; cd $$i ; $(MAKE) $(MFLAGS) clean ); \
- X done
- SHAR_EOF
- if test 6032 -ne "`wc -c < 'Makefile'`"
- then
- echo shar: error transmitting "'Makefile'" '(should have been 6032 characters)'
- fi
- fi # end of overwriting check
- echo shar: extracting "'pbmplus.h'" '(6877 characters)'
- if test -f 'pbmplus.h'
- then
- echo shar: will not over-write existing file "'pbmplus.h'"
- else
- sed 's/^X//' << \SHAR_EOF > 'pbmplus.h'
- X/* pbmplus.h - header file for PBM, PGM, PPM, and PNM
- X**
- X** Copyright (C) 1988, 1989, 1991 by Jef Poskanzer.
- X**
- X** Permission to use, copy, modify, and distribute this software and its
- X** documentation for any purpose and without fee is hereby granted, provided
- X** that the above copyright notice appear in all copies and that both that
- X** copyright notice and this permission notice appear in supporting
- X** documentation. This software is provided "as is" without express or
- X** implied warranty.
- X*/
- X
- X#ifndef _PBMPLUS_H_
- X#define _PBMPLUS_H_
- X
- X#include <sys/types.h>
- X#include <ctype.h>
- X#include <stdio.h>
- X
- X#if ! ( defined(BSD) || defined(SYSV) || defined(MSDOS))
- X/* CONFIGURE: If your system is >= 4.2BSD, set the BSD option; if you're a
- X** System V site, set the SYSV option; and if you're IBM-compatible, set
- X** MSDOS. If your compiler is ANSI C, you're probably better off setting
- X** SYSV.
- X*/
- X#define BSD
- X/* #define SYSV */
- X/* #define MSDOS */
- X#endif
- X
- X/* CONFIGURE: If you want to enable writing "raw" files, set this option.
- X** "Raw" files are smaller, and much faster to read and write, but you
- X** must have a filesystem that allows all 256 ASCII characters to be read
- X** and written. You will no longer be able to mail P?M files without
- X** using uuencode or the equivalent, or running the files through pnmnoraw.
- X** Note that reading "raw" files works whether writing is enabled or not.
- X*/
- X#define PBMPLUS_RAWBITS
- X
- X/* CONFIGURE: On some systems, the putc() macro is broken and will return
- X** EOF when you write out a 255. For example, ULTRIX does this. This
- X** only matters if you have defined RAWBITS. To test whether your system
- X** is broken this way, go ahead and compile things with RAWBITS defined,
- X** and then try "pbmmake -b 8 1 > file". If it works, fine. If not,
- X** define BROKENPUTC1 and try again - if that works, good. Otherwise,
- X** BROKENPUTC2 is guaranteed to work, although it's about twice as slow.
- X*/
- X/* #define PBMPLUS_BROKENPUTC1 */
- X/* #define PBMPLUS_BROKENPUTC2 */
- X
- X#ifdef PBMPLUS_BROKENPUTC1
- X#undef putc
- X/* This is a fixed version of putc() that should work on most Unix systems. */
- X#define putc(x,p) (--(p)->_cnt>=0? ((int)(unsigned char)(*(p)->_ptr++=(unsigned char)(x))) : _flsbuf((unsigned char)(x),p))
- X#endif /*PBMPLUS_BROKENPUTC1*/
- X#ifdef PBMPLUS_BROKENPUTC2
- X#undef putc
- X/* For this one, putc() becomes a function, defined in pbm/libpbm1.c. */
- X#endif /*PBMPLUS_BROKENPUTC2*/
- X
- X/* CONFIGURE: PGM can store gray values as either bytes or shorts. For most
- X** applications, bytes will be big enough, and the memory savings can be
- X** substantial. However, if you need more than 8 bits of grayscale resolution,
- X** then define this symbol.
- X*/
- X/* #define PGM_BIGGRAYS */
- X
- X/* CONFIGURE: Normally, PPM handles a pixel as a struct of three grays.
- X** If grays are stored in bytes, that's 24 bits per color pixel; if
- X** grays are stored as shorts, that's 48 bits per color pixel. PPM
- X** can also be configured to pack the three grays into a single longword,
- X** 10 bits each, 30 bits per pixel.
- X**
- X** If you have configured PGM with the PGM_BIGGRAYS option, AND you don't
- X** need more than 10 bits for each color component, AND you care more about
- X** memory use than speed, then this option might be a win. Under these
- X** circumstances it will make some of the programs use 1.5 times less space,
- X** but all of the programs will run about 1.4 times slower.
- X**
- X** If you are not using PGM_BIGGRAYS, then this option is useless -- it
- X** doesn't save any space, but it still slows things down.
- X*/
- X/* #define PPM_PACKCOLORS */
- X
- X/* CONFIGURE: uncomment this to enable debugging checks. */
- X/* #define DEBUG */
- X
- X#ifdef SYSV
- X
- X#include <string.h>
- X#define index(s,c) strchr(s,c)
- X#define rindex(s,c) strrchr(s,c)
- X#define srandom(s) srand(s)
- X#define random rand
- X#define bzero(dst,len) memset(dst,0,len)
- X#define bcopy(src,dst,len) memcpy(dst,src,len)
- X#define bcmp memcmp
- Xextern int rand();
- X
- X#else /*SYSV*/
- X
- X#include <strings.h>
- Xextern long random();
- X
- X#endif /*SYSV*/
- X
- Xextern int atoi();
- Xextern void exit();
- Xextern void srandom();
- Xextern long time();
- Xextern int write();
- X
- X/* CONFIGURE: On some systems, malloc.h doesn't declare these, so we have
- X** to do it. On other systems, for example HP/UX, it declares them
- X** incompatibly. And some systems, for example Dynix, don't have a
- X** malloc.h at all. A sad situation. If you have compilation problems
- X** that point here, feel free to tweak or remove these declarations.
- X*/
- X#include <malloc.h>
- Xextern char* malloc();
- Xextern char* realloc();
- Xextern char* calloc();
- X
- X/* CONFIGURE: Some systems don't have vfprintf(), which we need for the
- X** error-reporting routines. If you compile and get a link error about
- X** this routine, uncomment the first define, which gives you a vfprintf
- X** that uses the theoretically non-portable but fairly common routine
- X** _doprnt(). If you then get a link error about _doprnt, or
- X** message-printing doesn't look like it's working, try the second
- X** define instead.
- X*/
- X/* #define NEED_VFPRINTF1 */
- X/* #define NEED_VFPRINTF2 */
- X
- X/* End of configurable definitions. */
- X
- X
- X#undef max
- X#define max(a,b) ((a) > (b) ? (a) : (b))
- X#undef min
- X#define min(a,b) ((a) < (b) ? (a) : (b))
- X#undef abs
- X#define abs(a) ((a) >= 0 ? (a) : -(a))
- X#undef odd
- X#define odd(n) ((n) & 1)
- X
- X
- X/* Definitions to make PBMPLUS work with either ANSI C or C Classic. */
- X
- X#if __STDC__
- X#define ARGS(alist) alist
- X#else /*__STDC__*/
- X#define ARGS(alist) ()
- X#define const
- X#endif /*__STDC__*/
- X
- X
- X/* Initialization. */
- X
- Xvoid pm_init ARGS(( int* argcP, char* argv[] ));
- X
- X
- X/* Variable-sized arrays definitions. */
- X
- Xchar** pm_allocarray ARGS(( int cols, int rows, int size ));
- Xchar* pm_allocrow ARGS(( int cols, int size ));
- Xvoid pm_freearray ARGS(( char** its, int rows ));
- Xvoid pm_freerow ARGS(( char* itrow ));
- X
- X
- X/* Case-insensitive keyword matcher. */
- X
- Xint pm_keymatch ARGS(( char* str, char* keyword, int minchars ));
- X
- X
- X/* Log base two hacks. */
- X
- Xint pm_maxvaltobits ARGS(( int maxval ));
- Xint pm_bitstomaxval ARGS(( int bits ));
- X
- X
- X/* Error handling definitions. */
- X
- Xvoid pm_message ARGS(( char*, ... ));
- Xvoid pm_error ARGS(( char*, ... )); /* doesn't return */
- Xvoid pm_perror ARGS(( char* reason )); /* doesn't return */
- Xvoid pm_usage ARGS(( char* usage )); /* doesn't return */
- X
- X
- X/* File open/close that handles "-" as stdin and checks errors. */
- X
- XFILE* pm_openr ARGS(( char* name ));
- XFILE* pm_openw ARGS(( char* name ));
- Xvoid pm_close ARGS(( FILE* f ));
- X
- X
- X/* Endian I/O. */
- X
- Xint pm_readbigshort ARGS(( FILE* in, short* sP ));
- Xint pm_writebigshort ARGS(( FILE* out, short s ));
- Xint pm_readbiglong ARGS(( FILE* in, long* lP ));
- Xint pm_writebiglong ARGS(( FILE* out, long l ));
- Xint pm_readlittleshort ARGS(( FILE* in, short* sP ));
- Xint pm_writelittleshort ARGS(( FILE* out, short s ));
- Xint pm_readlittlelong ARGS(( FILE* in, long* lP ));
- Xint pm_writelittlelong ARGS(( FILE* out, long l ));
- X
- X
- X#endif /*_PBMPLUS_H_*/
- SHAR_EOF
- if test 6877 -ne "`wc -c < 'pbmplus.h'`"
- then
- echo shar: error transmitting "'pbmplus.h'" '(should have been 6877 characters)'
- fi
- fi # end of overwriting check
- echo shar: extracting "'version.h'" '(106 characters)'
- if test -f 'version.h'
- then
- echo shar: will not over-write existing file "'version.h'"
- else
- sed 's/^X//' << \SHAR_EOF > 'version.h'
- X/* version.h - define the current version of PBM, PGM, PPM, and PNM
- X*/
- X
- X#define PBMPLUS_VERSION "27sep91"
- SHAR_EOF
- if test 106 -ne "`wc -c < 'version.h'`"
- then
- echo shar: error transmitting "'version.h'" '(should have been 106 characters)'
- fi
- fi # end of overwriting check
- echo shar: extracting "'compat.csh'" '(1023 characters)'
- if test -f 'compat.csh'
- then
- echo shar: will not over-write existing file "'compat.csh'"
- else
- sed 's/^X//' << \SHAR_EOF > 'compat.csh'
- X# compat.csh - csh aliases to allow users of old versions of PBM to keep
- X# their habits.
- X#
- X# This script must be sourced - it will not work if you run it in a sub-shell.
- X
- Xalias pbmcatlr 'pnmcat -lr'
- Xalias pbmcattb 'pnmcat -tb'
- Xalias pbmcrop 'pnmcrop'
- Xalias pbmcut 'pnmcut'
- Xalias pbmenlarge 'pnmenlarge'
- Xalias pbmfliplr 'pnmflip -lr'
- Xalias pbmfliptb 'pnmflip -tb'
- Xalias pbmpaste 'pnmpaste'
- Xalias pbmtops 'pnmtops'
- Xalias pbmtorast 'pnmtorast'
- Xalias pbmtoxwd 'pnmtoxwd'
- Xalias pbmtrnspos 'pnmflip -xy'
- Xalias pcxtopbm 'pcxtoppm'
- Xalias pgmtops 'pnmtops'
- Xalias picttopbm 'picttoppm'
- Xalias ppmarith 'pnmarith'
- Xalias ppmconvol 'pnmconvol'
- Xalias ppmcscale 'pnmdepth'
- Xalias ppmrotate 'pnmrotate'
- Xalias ppmscale 'pnmscale'
- Xalias ppmshear 'pnmshear'
- Xalias ppmsmooth 'pnmsmooth'
- Xalias ppmtops 'pnmtops'
- Xalias ppmtorast 'pnmtorast'
- Xalias ppmtoxwd 'pnmtoxwd'
- Xalias rasttopbm 'rasttopnm'
- Xalias rasttoppm 'rasttopnm'
- Xalias tifftopbm 'tifftopnm'
- Xalias tifftopgm 'tifftopnm'
- Xalias xwdtopbm 'xwdtopnm'
- Xalias xwdtoppm 'xwdtopnm'
- SHAR_EOF
- if test 1023 -ne "`wc -c < 'compat.csh'`"
- then
- echo shar: error transmitting "'compat.csh'" '(should have been 1023 characters)'
- fi
- fi # end of overwriting check
- echo shar: extracting "'compat.ksh'" '(1023 characters)'
- if test -f 'compat.ksh'
- then
- echo shar: will not over-write existing file "'compat.ksh'"
- else
- sed 's/^X//' << \SHAR_EOF > 'compat.ksh'
- X# compat.ksh - ksh aliases to allow users of old versions of PBM to keep
- X# their habits.
- X#
- X# This script must be sourced - it will not work if you run it in a sub-shell.
- X
- Xalias pbmcatlr='pnmcat -lr'
- Xalias pbmcattb='pnmcat -tb'
- Xalias pbmcrop='pnmcrop'
- Xalias pbmcut='pnmcut'
- Xalias pbmenlarge='pnmenlarge'
- Xalias pbmfliplr='pnmflip -lr'
- Xalias pbmfliptb='pnmflip -tb'
- Xalias pbmpaste='pnmpaste'
- Xalias pbmtops='pnmtops'
- Xalias pbmtorast='pnmtorast'
- Xalias pbmtoxwd='pnmtoxwd'
- Xalias pbmtrnspos='pnmflip -xy'
- Xalias pcxtopbm='pcxtoppm'
- Xalias picttopbm='picttoppm'
- Xalias ppmarith='pnmarith'
- Xalias ppmconvol='pnmconvol'
- Xalias ppmcscale='pnmdepth'
- Xalias ppmrotate='pnmrotate'
- Xalias ppmscale='pnmscale'
- Xalias ppmshear='pnmshear'
- Xalias ppmsmooth='pnmsmooth'
- Xalias ppmtops='pnmtops'
- Xalias ppmtops='pnmtops'
- Xalias ppmtorast='pnmtorast'
- Xalias ppmtoxwd='pnmtoxwd'
- Xalias rasttopbm='rasttopnm'
- Xalias rasttoppm='rasttopnm'
- Xalias tifftopbm='tifftopnm'
- Xalias tifftopgm='tifftopnm'
- Xalias xwdtopbm='xwdtopnm'
- Xalias xwdtoppm='xwdtopnm'
- SHAR_EOF
- if test 1023 -ne "`wc -c < 'compat.ksh'`"
- then
- echo shar: error transmitting "'compat.ksh'" '(should have been 1023 characters)'
- fi
- fi # end of overwriting check
- echo shar: extracting "'magic'" '(1080 characters)'
- if test -f 'magic'
- then
- echo shar: will not over-write existing file "'magic'"
- else
- sed 's/^X//' << \SHAR_EOF > 'magic'
- X# PBMPLUS auxiliary magic numbers file
- X#
- X# These are meant to be used with the "file" program to help determine
- X# the type of a file. You can add these entries to the system's /etc/magic
- X# file, or if your version of "file" supports the -m flag you can use
- X# them that way.
- X#
- X# All of these entries use the "string" format so that they will work on
- X# both big-endian and little-endian machines.
- X
- X0 string \037\235 compressed file
- X0 string begin uuencoded file
- X0 string xbtoa btoa'd file
- X
- X0 string P1 PBM file
- X0 string P2 PGM file
- X0 string P3 PPM file
- X0 string P4 PBM "rawbits" file
- X0 string P5 PGM "rawbits" file
- X0 string P6 PPM "rawbits" file
- X
- X0 string \361\0\100\273 CMU window manager bitmap
- X0 string \131\246\152\225 Sun rasterfile
- X0 string yz MGR bitmap
- X0 string \115\115 TIFF file, big-endian
- X0 string \111\111 TIFF file, little-endian
- X0 string GIF87a GIF file
- X0 string GIF89a GIF file
- X8 string ILBM IFF ILBM file
- X0 string This\040is\040a\040BitMap\040file Lisp Machine bit-array-file
- X0 string !! Bennet Yee's "face" format
- SHAR_EOF
- if test 1080 -ne "`wc -c < 'magic'`"
- then
- echo shar: error transmitting "'magic'" '(should have been 1080 characters)'
- fi
- fi # end of overwriting check
- # End of shell archive
- exit 0
-
- exit 0 # Just in case...
- --
- Kent Landfield INTERNET: kent@sparky.IMD.Sterling.COM
- Sterling Software, IMD UUCP: uunet!sparky!kent
- Phone: (402) 291-8300 FAX: (402) 291-4362
- Please send comp.sources.misc-related mail to kent@uunet.uu.net.
-