home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-08-22 | 56.5 KB | 1,706 lines |
- Newsgroups: comp.sources.misc
- From: Rich Burridge <richb@Aus.Sun.COM>
- Subject: v22i048: popi - The Digital Darkroom, Part09/09
- Message-ID: <1991Aug22.153235.16057@sparky.IMD.Sterling.COM>
- X-Md4-Signature: 22482ffbd26278b746541d38feb3fe43
- Date: Thu, 22 Aug 1991 15:32:35 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: Rich Burridge <richb@Aus.Sun.COM>
- Posting-number: Volume 22, Issue 48
- Archive-name: popi/part09
- Environment: Xlib, Xview, SunView
- Supersedes: popi: Volume 9, Issue 47-55
-
- #! /bin/sh
- # 1. Remove everything above the #! /bin/sh line
- # 2. Save the resulting text in a file.
- # 3. Execute the file with /bin/sh to create the files:
- # FILES
- # MANIFEST
- # CHANGES
- # popi.man.text
- # This archive created: Wed Aug 21 10:36:13 EST 1991
- #
- #
- export PATH; PATH=/bin:$PATH
- #
- if [ -f FILES ]
- then
- echo shar: will not over-write existing file FILES
- else
- echo shar: extracting 'FILES', 2998 characters
- cat > FILES <<'Funky_Stuff'
-
- @(#)FILES 1.2 91/01/03
-
- This file describes all the files that make up the Reve distribution.
-
- README - describes what popi is, and how to get started.
- Makefile.dist - master Makefile used to build popi on most systems.
- TODO - bugs and suggested enhancements. Volunteers?
- popi.msc - Make file for Microsoft braindamaged make.
- popi.prj - Popi project file (for PC compilers).
- powerc.prj - Project file for Mix Software's Power C Compiler
- popitopgm.c - small filter to convert old popi format images to pgm.
-
- debug.c - debug routines used by popi.
- expr.c - parser routines used by popi.
- io.c - file handling routines used by popi
- lex.c - lexical routines used by popi
- main.c - main routine and declarations used by popi.
- polar.c - polar coordinate handling routines used by popi.
-
- libpbm.c - PBM/PGM/PPM routines used by popi in io.c
- libpbm.h - definitions used by the PBM/PGM/PPM routines.
- run.c - run time interpreter used by popi.
- special.c - special transformations used by popi.
- popi.icon - popi icon used when the popi window is iconifed.
-
- gl.c - special version of the gl initialisation routines.
- g_init.c - graphics device driver for the gl window system.
-
- amiga.c - graphics device driver for the Amiga.
- apollo.c - graphics device driver for the Apollo.
- atariterm.c - graphics device driver for Atari TERM windows.
- graphics.c - independent graphics routines used by popi.
- hp.c - graphics device driver for an HP 8+ plane display.
- kerterm.c - graphics driver for kermit TERM windows.
-
- ibmpc.c - graphics driver for the IBM PC's.
- mgr.c - graphics driver used the MGR window system.
- news.c - C wrappers for the NeWS graphics routines.
- next.m - graphics driver for the NeXT machine.
-
- nulldev.c - device driver for a null device.
- sunview.c - Sun SunView graphics routines.
- x11.c - X11 (Xlib) graphics routines.
- xview.c - X11 XView toolkit graphics routines.
-
- popi.ps - NeWS graphics routines used by popi.
- popi.h - definitions and constants used by popi.
- graphics.h - optional graphics external variables and definitions.
- patchlevel.h - current patchlevel for this release of popi.
- lex.h - definitions used by the popi lexical parser.
- popi.man - the popi manual page (troff/nroff -man format).
-
- FILES - what you're reading now.
- MANIFEST - tells you what archive part each file was in.
- CHANGES - change history. Updated with each new patch.
- popi.man.text - plain text version of the popi manual pages.
- Funky_Stuff
- len=`wc -c < FILES`
- if [ $len != 2998 ] ; then
- echo error: FILES was $len bytes long, should have been 2998
- fi
- fi # end of overwriting check
- if [ -f MANIFEST ]
- then
- echo shar: will not over-write existing file MANIFEST
- else
- echo shar: extracting 'MANIFEST', 2232 characters
- cat > MANIFEST <<'Funky_Stuff'
-
- @(#)MANIFEST 1.4 91/01/03
-
- This file tells you in which part of the popi distribution each
- file appeared.
-
- Filename. | Part #
- --------------------------------------------------
- README | 1
- Makefile.dist | 1
- TODO | 1
- popi.msc | 1
- popi.prj | 1
- powerc.prj | 1
- popitopgm.c | 1
- debug.c | 2
- expr.c | 2
- io.c | 2
- lex.c | 2
- main.c | 2
- polar.c | 2
- libpbm.c | 3
- libpbm.h | 3
- run.c | 3
- special.c | 3
- popi.icon | 3
- gl.c | 4
- g_init.c | 4
- amiga.c | 5
- apollo.c | 5
- atariterm.c | 5
- graphics.c | 5
- hp.c | 5
- kerterm.c | 5
- ibmpc.c | 6
- mgr.c | 6
- news.c | 6
- next.m | 6
- nulldev.c | 7
- sunview.c | 7
- x11.c | 7
- xview.c | 7
- popi.ps | 8
- popi.h | 8
- graphics.h | 8
- patchlevel.h | 8
- lex.h | 8
- popi.man | 8
- FILES | 9
- MANIFEST | 9
- CHANGES | 9
- popi.man.text | 9
- Funky_Stuff
- len=`wc -c < MANIFEST`
- if [ $len != 2232 ] ; then
- echo error: MANIFEST was $len bytes long, should have been 2232
- fi
- fi # end of overwriting check
- if [ -f CHANGES ]
- then
- echo shar: will not over-write existing file CHANGES
- else
- echo shar: extracting 'CHANGES', 12961 characters
- cat > CHANGES <<'Funky_Stuff'
-
- Popi change history.
- --------------------
-
- v3.1 - patchlevel 0. - 21st August 1991.
- ----------------------------------------
-
- * Added mention of the popi mailing list to the README file.
-
- * Popi can now correctly handle the reading of compressed image files from
- the command line.
-
- * From Stephen Frede <stephenf@softway.sw.oz.au>
- - trunc() in special.c is a library routine on some machines, and the
- declaration in the header files conflicts. Changed name to "imtrunc".
-
- - signed is an ANSI keyword, and so should not be used as a function name
- in special.c - I have changed it to "dosigned()".
-
- * Added all known problems, suggestions and comments received, to the TODO
- file.
-
- * Ran the X11 version of popi through Saber-C fixing up compile time
- inconsistencies.
- - The color variable was being used before it was set in the oil()
- routine in special.c
- - various variables no longer used.
-
- * From Adrian F. Clark <alien@essex.ac.uk>
- Backspacing/deleting back pass the beginning of input, caused a core dump.
-
- * Range checking has been added to the OP_CRVAL case in prun() in run.c. This
- now allows examples like:
-
- -> :read "dmr"
- -> new[x,y]=dmr[x,y]+(Z/2 -dmr[x+2,y+2])
-
- -> :r "dmr"
- -> new[x,y]=dmr[x*2,y*2]
-
- to correctly work.
-
- * The X11 (Xlib) and XView graphics drivers now build an image offscreen, so
- that they can correctly restore the image canvas for repaint events.
-
- * All references to revtable in x11.c and xview.c have been removed.
-
- * Prepared popi distribution for release to comp.sources.misc.
-
- v3.0 - patchlevel 7. - 25th March 1991.
- ---------------------------------------
-
- * Fixed up the % operator in the op_op table.
-
- * Fixed up handling of the Images array in the OP_CRVAL case in the switch
- table in prun().
-
- v3.0 - patchlevel 6. - 17th January 1991.
- -----------------------------------------
-
- * From Russ Nelson <nelson@sun.soe.clarkson.edu>
- Makefile.dist changes for DOS. Borland's Make doesn't grok .keep_changes,
- nor the lint_*:; lint ... lines. I commented out .keep_changes, and split
- out the line_*:; lines into more vanilla dependencies
-
- * Fixed up color support for the XView graphics driver. Still needs to be
- tested on a TrueColor display.
-
- * Added in PBM support when reading images. PBM files are simply converted to
- a grayscale image that has two values; 0 or 1. The nature of PBMPLUS is such
- that ppm automatic should support pgm and pbm.
-
- v3.0 - patchlevel 5. - 14th January 1991.
- -----------------------------------------
-
- * From Rich Morin <cfcl!rdm@apple.com>
-
- - polar.c, main.c, popi.h
-
- Tidied up a bit. Couldn't find any basic speed up, unfortunately... The
- calculation takes ~120 seconds on my Sun-3/60. Hypot's time could be cut
- almost in half, but it takes only 25% of the time, so the gain would be
- only 12.5%, and the kludge is pretty hairy.
-
- Set up a control flag named tcache; it controls caching of trig values
- for all four quadrants in "/usr/tmp/popi.<Xsize>.<Ysize>".
- Might want to save only quadrant 2 (the cache file for 512x512 is
- currently 1MB).
-
- N.B. FREAD and FWRITE were defined in popi.h, but never used. They
- conflicted with definitions in <fcntl.h>, so I killed them.
-
- - special.c, io.c, popi.h
-
- Set :ofmt up as a command, like :signed. It corresponds to the -o flag.
-
- v3.0 - patchlevel 4. - 9th January 1991.
- ----------------------------------------
-
- * popi will now attempt to read the old format image file auto-magically if
- it detects that the image file is not in pgm or ppm format. Even if it read
- a grayscale image in the old format, it will still write it out in pgm
- format, unless the user has given the -o command line option. The manual
- pages have been updated to mention all this.
-
- * The command line options at the beginning of the manual pages have been
- rearranged in alphabetical order.
-
- v3.0 - patchlevel 3. - 3rd January 1991.
- ----------------------------------------
-
- * From Rich Morin <cfcl!rdm@apple.com>
- The basic SunView interface seems to be functional. The following glitches
- were fixed:
-
- :l - didn't show possibilities on ambiguous abbreviations fixed:
- special (special.c)
-
- ? - printed specials as #w..., not :w... fixed: HelpMsg, help
- (special.c)
-
- ^D - hung popi input, generated huge error log fixed: disp_getchar
- (sunview.c)
-
- **<<May want to check for similar bugs in other drivers>>**
-
- popi -\? - usage message was incomplete
- fixes: filled out usage table a bit: UsageMsg (main.c) also
- sorted option parsing switch: get_options (main.c)
-
- popi -d - dumped core if no argument was given
- popi -g - dumped core if no argument was given kludged: get_options
- (main.c)
-
- Fixed some minor fluff in the manual page:
-
- magic cookie for specials is now :, not #.
- magic cookie (?) for color I/O is no longer needed.
- Its "it's" was wrong, now it's "its"... CFCL is only one laboratory (if
- that).
-
- New files:
-
- * popitopgm.c - a small filter to convert old format popi image files to
- pgm format. See the README and manual pages for more
- details.
-
- v3.0 - patchlevel 2. - 31st December 1990.
- ------------------------------------------
-
- * Converted the image reading/writing routines to use pgm (portable graymap)
- for greyscale images, and ppm (portable pixmap) for color images. The
- manuals pages have been updated to include a new section describing the
- image formats. The README file had been modified to included the appropriate
- copyright messages. The FILES and MANIFEST files have been modified to
- mention the new files.
-
- * From Russ Nelson <nelson@sun.soe.clarkson.edu>
- The command line is now too long for DOS compilers. All DOS compilers will
- have this problem: Turbo C, MS-C, MS-Quick C, and Mix C. The solution used,
- has been to put all the object files but main into a library, and link using
- that library. This keeps the Makefile the same for everyone, but it makes it
- slightly harder to maintain because of the addition of library commands.
-
- New files:
-
- * libpbm.c - the PBM/PGM/PPM routines needed by popi. These have been
- taken from the PBMPLUS package, and modified appropriately for
- popi.
-
- * libpbm.h - definitions and declaration for the PBM/PGM/PPM routines used
- by popi. Used in libpbm.c and io.c.
-
- v3.0 - patchlevel 1. - 28th December 1990.
- ------------------------------------------
-
- * The X11 (Xlib) version was creating a pixmap of the full image size every
- time it was drawing a scanline. The pixmap only needed to be one pixel high.
-
- * Rewrote the XView version in the same style as the SunView driver.
-
- v3.0 - patchlevel 0. - Started 21st December 1990.
- --------------------------------------------------
-
- * From Russ Nelson <nelson@image.soe.clarkson.edu>
- Incorporated various efficiency changes.
-
- * From Rich Morin <cfcl!rdm@apple.com>
- - Added a -c flag - color (RGB) calculation, display, and I/O (NTSC luma
- display on non-24-bit monitors)
-
- - Added a -s flag, #signed - signed I/O
-
- - Added 24-bit monitor support under SunView
-
- - Added smallest unambiguous name recognition for special commands (eg, #r)
-
- - Added table-driven messages about special commands in #help
-
- - Assorted bug fixes
-
- * Generated a Makefile.dist, which will need to be copied over to Makefile.
- This saves stomping on everybodies toes when changes to the Makefile need
- to be made.
-
- * Reversed the order of information in the CHANGES file. The latest entries
- are now first.
-
- * Created MANIFEST and FILES files for popi. Moved the troffable manual pages
- to popi.man, and the plain text version to popi.man.text. Updated the TODO
- file with a list of all the new problems and suggested enhancements since
- the previous version was posted to the net. The README file has been
- reordered into various sections, with a contents at the front.
-
- * Indented the code in debug.c, expr.c, io.c, lex.c main.c, polar.c, run.c,
- special.c and popi.h to the same style.
-
- * Replaced the threshold half-toning with floyd-steinberg error diffusion
- dithering (taken from xloadimage).
-
- v2.1 - patchlevel 6. - Posted to comp.sources.bugs (May 1990).
- --------------------------------------------------------------
-
- * From Russ Nelson <nelson@image.soe.clarkson.edu>
- Previously most tokens were represented as their character equivalents.
- These have been changed to numeric defines so that many compilers can
- generate better code for the switch statement in prun().
-
- * Added some debugging to help trace tokens.
-
- * From K. Palaniappan <palani@uirvld.csl.uiuc.edu>
- Fixed the out of range problem at CRVAL in prun().
-
- v2.1 - patchlevel 5. - Posted to comp.sources.bugs (January 1990).
- ------------------------------------------------------------------
-
- * There is now an optional compilation parameter. If DEF_SIZE is defined, the
- image will be square and that size by default. If DEF_X and/or DEF_Y are
- defined, the image will be the size given by the definitions. Makefile has
- been modified to add a definition of -DDEF_SIZE=128 for the PC versions.
-
- New files:
-
- * gl.c - a graphics driver for the public domain gl graphics package
- from Glenn Geers <glenn@extro.ucc.su.oz>. Glenn has used this
- to port to the 386 Xenix box.
- See the comments at the beginning of the gl graphics driver
- for more information on just what devices and O/S's are
- supported.
-
- * g_init.c - a new version of the g_init.c file that comes with the gl
- graphics package, which includes 386 mods.
-
- v2.1 - patchlevel 4. Posted to comp.sources.bugs (January 1990).
- ----------------------------------------------------------------
-
- * The size of the input buffer for typing has been changed from 80 to 256
- characters.
-
- * The SunView driver has been completely rewritten. It now has a scrollable
- text window for command input, and a canvas window of the correct size for
- displaying the images. There is a panel with a "% done" slider which is
- displayed as it is generating the next image. The SunView driver therefore
- no longer uses graphics.c.
-
- * The comment for the exportable routines in each graphics driver has been
- changed from "ten routines" to "the routines". There are now only nine
- routines.
-
- * The declaration for the variable total in getpix in file io.c was in the
- wrong position, and prevented the file from successfully compiling. This
- problem was introduced in patch #3.
-
- * Added disp_percentdone(100) calls to the oil and tile routines in special.c.
-
- * In disp_perecentdone in graphics.c, a check is now made that the new percent
- value is different from the old one, otherwise the routine returns
- immediately. This dramatically improves the performance of server based
- graphics drivers.
-
- * The routine ImgAlloc in io.c was incorrectly mallocing an area based on the
- variable Xsize. This should have been Ysize.
-
- * Two small adjustments to the HP graphics driver.
-
- * Introduces the : operator to denote special functions. This replaces the #
- operator, which is currently retained for backward compatibility, but with
- no guarantee that this will always remain so. The manual page has been
- updated to reflect this change.
-
- * The popi help message has been updated to include several missing functions
- plus the new functions.
-
- * Inclusion of the :quit, :exit and :q functions. Guess what they do!
-
- New files:
-
- * next.m - a graphics driver for the NeXT from Joe Freeman of NeXT. Note
- that a different OCFLAGS value in the Makefile should be used.
-
- * CHANGES - documented history of the changes made with each new popi patch.
-
- v2.1 - patchlevel 3. - Posted to comp.sources.bugs (December 1989).
- -------------------------------------------------------------------
-
- * Checking has been added to prevent constructs such as: dmr[x+1,y+1]=....
- causing a segmentation fault.
-
- * The X11 driver has been fixed to correctly display on monochrome screens
- where the black pixel isn't 1.
-
- * New commands #create and #run have been added.
-
- * ungetc is now handled in the main popi code, so the graphics routine
- disp_ungetc is no longer needed.
-
- * Fixed a few typos in the manual page.
-
- * Adjusted a few inefficiencies found in expr.c, io.c and main.c
-
- * Several changes to allow a potential change in the image data structure.
-
- New files:
-
- * popi.man - this is a plain text version of the popi manual page (popi.1)
- for those people who do not have the ability to format popi.1.
-
- * hp.c - a graphics driver for an HP display from Eric Haines - 3D/Eye
- Inc, Ithaca, NY.
-
- v2.1 - patchlevel 2. - Released to comp.sources.misc (December 1989).
- ---------------------------------------------------------------------
- Funky_Stuff
- len=`wc -c < CHANGES`
- if [ $len != 12961 ] ; then
- echo error: CHANGES was $len bytes long, should have been 12961
- fi
- fi # end of overwriting check
- if [ -f popi.man.text ]
- then
- echo shar: will not over-write existing file popi.man.text
- else
- echo shar: extracting 'popi.man.text', 37480 characters
- cat > popi.man.text <<'Funky_Stuff'
-
-
-
- POPI(1L) MISC. REFERENCE MANUAL PAGES POPI(1L)
-
-
-
- NAME
- popi - perform interactive digital image transformations
-
- SYNOPSIS
- popi [option] ... [file] ...
-
- DESCRIPTION
- Popi is a program which allows arbitrary transformations to
- be interactively applied to digital images. It is based on
- the program described in "Beyond Photography - The Digital
- Darkroom" by Gerald J. Holzmann. The meanings of the avail-
- able command line options are as follows:
-
- -a- Turn auto-display off. Equivalent to the :display -
- command. Images can still be displayed explicitly with
- the :display image command.
-
- -a+ Turn auto-display on. After each image transformation,
- the image will be displayed. Equivalent to the
- :display + command (default).
-
- -c+ Set the colour mode flag on. Do all work in RGB.
- Grayscale displays present NTSC Luma values.
-
- -c- Turn the colour mode flag off. Use grayscale
- (default).
-
- -l[logfile]
- Enables logging of all input, error messages, and some
- responses. Logging is done on the named file, or the
- file "popi.log" if no name is given. The :logfile com-
- mand may also be used to turn logging on and off.
-
- -o Save images to disk in the old popi format.
-
- -p[ncpus]
- On a Sequent multiprocessor, use the specified number
- of cpus to perform the transform. If this option is
- given without a number, the maximum number available is
- used. This option has no effect on uniprocessor com-
- puters.
-
- -s+ Set the signed I/O flag on. Do signed I/O.
-
- -s- Turn the signed I/O flag off. Do unsigned I/O
- (default).
-
- -t+ Set the trig caching flag on. Cache trig values in
- /usr/tmp/popi.X.Y, where X and Y are the size limits
- for the current popi run. (This speeds up the first
- use of polar co-ordinates in each run.)
-
-
-
-
- Sun Release 4.1 Last change: 20 December 1989 1
-
-
-
-
-
-
- POPI(1L) MISC. REFERENCE MANUAL PAGES POPI(1L)
-
-
-
- -t- Turn the trig caching flag off. Don't do trig caching
- (default).
-
- -V Print program version identification message and exit.
-
- -v+ Set the verbose flag on. Be chatty about a number of
- things.
-
- -v- Turn the verbose flag off. Be silent about everything
- except error messages (default).
-
- -xWidth
- Set the image width (number of pixels per scanline) to
- Width (default 512).
-
- -yHeight
- Set the image height (number of scanlines) to Height
- (default 512).
-
- SYNTAX
- An image transform is described by a transform statement.
- The statement basically takes the form
-
- dest = expression
-
- where dest indicates the new image and expression describes
- a transformation. This statement is executed over the range
- of image coordinates. For a 512 x 512 image, it will be
- executed 262144 times. An image is normally referenced in a
- statement by its name and an index. A cartesian index is
- specified by using the x and y coordinates in square brack-
- ets after the image name. Thus dmr[0,0] is the top left
- pixel in the image named dmr. Polar coordinates may be
- specified by giving a radius and angle (in degrees) in curly
- brackets. Thus dmr{0,0} refers to the centre pixel in the
- image. The symbols x and y may appear in the transform
- statement. These take on values corresponding to a dif-
- ferent pixel each time the transform is executed. Inter-
- nally the algorithm is as follows
-
- for y varying from 0 to Y
- for x varying from 0 to X
- execute transform statement
-
-
- where Y is the maximum y coordinate and X is the maximum x
- coordinate. The image size can be set on the command line
- as described later. The value of a pixel varies from 0 to
- 255 in the current implementation. Any value outside this
- range is treated as modulo 256 when being stored in an image
- (ie. it wraps around). Low numeric values represent dark
- colours, while large values represent light colours. A
-
-
-
- Sun Release 4.1 Last change: 20 December 1989 2
-
-
-
-
-
-
- POPI(1L) MISC. REFERENCE MANUAL PAGES POPI(1L)
-
-
-
- simple transform statement to set an image to completely
- black would be
-
- new[x,y] = 0 ; set image to black
-
- The name new is one of the two default images always main-
- tained internally. The other is old. The images referred to
- by these names are swapped after each operation, so a suc-
- cession of transforms may modify the "old" image to produce
- a "new" image. Thus the statement
-
- new[x,y] = old[x,y] / 2 ; darken image
-
- will reduce all the pixel intensity values by a half, dark-
- ening the existing image. The semicolon (`;') character
- introduces a comment. Anything from this to the end of the
- line is ignored. All the standard arithmetic, relational
- and boolean operators from the C language are available,
- with precedence generally as per the C language. Some addi-
- tional operators, predefined variables and math functions
- are also available. Here is a listing of the available sym-
- bols and their meanings.
-
- name Refers to an image name. If not followed by index
- brackets, the index [x,y] is assumed. The currently
- available names are those shown by the :list display,
- and also old and new.
-
- $n Where n is a digit, this is an alternative method of
- referring to an image. In fact this may be the only
- method if the image name contains punctuation charac-
- ters. The :list command shows the correspondence
- between image names and this form of reference.
-
- X The maximum x coordinate value. This is one less than
- the number of pixels per scanline (image width), which
- may be set with the -x command line option.
-
- Y The maximum y coordinate value. This is one less than
- the number of scanlines (the height of the image),
- which may be set with the -y command line option.
-
- x The current cartesian x coordinate. Varies from 0
- (left of image) to X (right of image).
-
- y The current cartesian y coordinate. Varies from 0 (top
- of image) to Y (bottom of image).
-
- r The radius component of the polar coordinate which
- corresponds to the current cartesian (x,y) coordinate.
- This is equivalent to sqrt(x*x + y*y) with a transla-
- tion of the origin.
-
-
-
- Sun Release 4.1 Last change: 20 December 1989 3
-
-
-
-
-
-
- POPI(1L) MISC. REFERENCE MANUAL PAGES POPI(1L)
-
-
-
- a The angle component of the polar coordinate which
- corresponds to the current cartesian (x,y) coordinate.
- This is equivalent to (and a shorthand for) atan(y/x).
-
- Note that the first time in a popi session you use an
- expression with either r or a in it, you may notice an
- extra delay before the image transformation begins.
- This is due to precalculation of an array of polar
- coordinates that happens the first time you use one.
-
- R The maximum radius value of a polar coordinate.
-
- A The maximum angle value of a polar coordinate (this is
- just 360).
-
- Z The maximum intensity value of a pixel (corresponding
- to white). Currently, this is always 255.
-
- ** The exponentiation (raise to the power) operator. The
- expression x ** 2 means x squared (x * x).
-
- * The multiplication operator. This has a higher pre-
- cedence than division to avoid underflow in expressions
- with multiplication and division, since normally
- expressions are evaluated as integers.
-
- / Integer division. If the divisor is 0, the result is
- set to Z.
-
- % Modulo. If the divisor (right hand operand) is 0, the
- result is set to 0.
-
- + Addition.
-
- - Subtraction. This may be a unary or a binary operator.
-
- << Left shift. The left operand is shifted left the
- number of bits specified by the right operand.
-
- >> Right shift. The left operand is shifted right the
- number of bits specified by the right operand.
-
- > Greater than. As with all the relational operators, if
- the specified relation between the operands is true,
- the result is 1, otherwise the result is 0.
-
- < Less than.
-
- >= Greater than or equal to.
-
- <= Less than or equal to.
-
-
-
-
- Sun Release 4.1 Last change: 20 December 1989 4
-
-
-
-
-
-
- POPI(1L) MISC. REFERENCE MANUAL PAGES POPI(1L)
-
-
-
- == Test for equality.
-
- != Not equal to.
-
- & Bitwise (arithmetic) AND operator.
-
- ^ Bitwise exclusive OR (XOR) operator.
-
- | Bitwise (arithmetic) OR operator.
-
- && Logical AND operator. The result is 1 if both of the
- operands are true (non-zero); otherwise the result is
- 0. Unlike the && operator of the C language, this
- operator is currently not conditional. Both operands
- are always evaluated.
-
- || Logical OR operator. The result is 1 if both either
- (or both) of the operands are true (non-zero); other-
- wise the result is 0. Unlike the || operator of the C
- language, this operator is currently not conditional.
- Both operands are always evaluated.
-
- sin(expr)
- This gives the value of the trigonometric sine of the
- expression, multiplied by Z. This is required because
- all operations are performed with integers.
-
- cos(expr)
- This gives the value of the trigonometric cosine of the
- expression, multiplied by Z. This is required because
- all operations are performed with integers.
-
- atan(y-expr,x-expr)
- This returns the trigonometric arctangent (inverse
- tangent) of y-expr/x-expr in degrees (ie the value
- returned will be between 0 and 360).
-
- hypot(x,y)
- This returns the hypotenuse (x*x + y*y).
-
- log(expr)
- Returns the natural logarithm of the expression.
-
- sqrt(expr)
- Returns the square root of the expression.
-
- abs(expr)
- Returns the absolute value of the expression.
-
- rand()
- Returns a positive random number. This will usually be
- used with the modulo or bitwise AND operator to
-
-
-
- Sun Release 4.1 Last change: 20 December 1989 5
-
-
-
-
-
-
- POPI(1L) MISC. REFERENCE MANUAL PAGES POPI(1L)
-
-
-
- restrict the range of the result. For example,
-
- new[x,y] = old[x,y] + rand() % 20 - 10
-
- will adjust the brightness levels of each pixel in the
- old image by a random amount (up to 10 levels brighter
- or darker).
-
- SPECIAL COMMANDS
- Popi supports a number of special commands, each starting
- with a : character. The current set of commands includes:
- debug, display, free, genepson, genps, help, list, logfile,
- matte, melt, ofmt, oil, read, shear, signed, slice, tile,
- truncate, undo, verbose, version, and write. They may be
- abbreviated to the minimum unambiguous length (e.g., :r).
- Their definitions follow:
-
- :read "filename" [image-name]
- Read a raw data file into the named image. If no image
- name is specified, the name is derived from the base
- name component of the filename. If the name already
- exists, that image is overwritten in memory, otherwise
- a new image is created. If the filename does not
- exist, but the same name with a ".Z" suffix does exist,
- it is assumed that the file is compressed and the
- "zcat" program is used to read the compressed image.
-
- Note that when the image name defaults to the file
- name, only the basename (portion after the last '/'
- character, if any) is used to name the image. If this
- resulting name starts with a digit, or contains any
- characters other than alphabetic, digits and the under-
- score, you will not be able to reference the image by
- name, but will have to use the alternative "$n" syntax.
-
- :write "filename" [image-name]
- Write a raw data file from the named image. The image
- name is optional, and if not specified, image "old" is
- used. If the first character of the filename is `|',
- the rest of the filename is interpreted as a command to
- be run, with the raw image data being fed to it as
- standard input.
-
- :list
- All the named images (other than "old" and "new" are
- listed).
-
- :genps "filename" [image-name]
- Generate postscript to produce the image. The image
- name is optional, and if not specified, image "old" is
- used. The image will be scaled to fit whatever paper
- size is being used. As with the :write command, if the
-
-
-
- Sun Release 4.1 Last change: 20 December 1989 6
-
-
-
-
-
-
- POPI(1L) MISC. REFERENCE MANUAL PAGES POPI(1L)
-
-
-
- first character of the filename is a `|' symbol, the
- rest of the string will be treated as a command to be
- executed, with the postscript being piped to its stan-
- dard input. This is convenient for printing images on
- a PostScript printer.
-
- :undo
- The old and new images are swapped. This has the
- effect of restoring the image that existed before the
- last transformation.
-
- :genepson "filename" [image-name]
- Generate data for an Epson (or compatible) printer to
- produce the image. The image name is optional, and if
- not specified, image "old" is used. Under MSDOS, the
- device name can be used directly (eg "PRN").
-
- The existing code is for a 24-pin printer such as the
- LQ-500. To generate data for an 8-pin printer requires
- a couple of minor modifications to function genepson()
- in file special.c.
-
- :undo
- The old and new images are swapped. This has the
- effect of restoring the image that existed before the
- last transformation.
-
- :display image-name
- The named image will be displayed. This is the fastest
- way to display an image, and works regardless of the
- state of auto-display.
-
- :display +
- Turn auto-display on (equivalent to the command-line
- option -a+ ).
-
- :display -
- Turn auto-display off (equivalent to the command-line
- option -a- ).
-
- :truncate +
- All assignments to an image with values outside the
- range 0 to Z will be truncated to the appropriate boun-
- dary, instead of wrapping as described in the book. An
- example of using this feature would be for a simplistic
- lightening of an image by adding a constant value.
- Normally, very white areas would wrap around and become
- black, but enabling truncation prevents this.
-
- :truncate -
- All assignments to an image will be done modulo (Z+1).
- This is the default.
-
-
-
- Sun Release 4.1 Last change: 20 December 1989 7
-
-
-
-
-
-
- POPI(1L) MISC. REFERENCE MANUAL PAGES POPI(1L)
-
-
-
- :truncate
- Report whether truncation is currently in effect or
- not.
-
- :verbose +
- Turn on verbose mode. Equivalent to the -v+command
- Certain warning messages will be printed. This turns
- on the "percent done" feature of some drivers (on oth-
- ers it is always active).
-
- :verbose -
- Turn off verbose mode. Equivalent to the -v-command
-
- :verbose
- Report the state of the verbose flag.
-
- :signed +
- All file I/O is done in signed (2's complement) mode.
-
- :signed -
- All file I/O is done in unsigned mode. This is the
- default.
-
- :signed
- Report the state of the signed I/O flag.
-
- :ofmt +
- The old popi format is used for output files.
-
- :ofmt -
- The new popi format is used for output files. This is
- the default.
-
- :ofmt
- Report the state of the output format flag.
-
- :logfile +
- Enable logging on the current log file (default
- "popi.log"). If logging is already enabled, the file
- is closed and re-opened with a new timestamp appended.
-
- :logfile -
- Disable logging"
-
- :logfile "filename"
- Enable logging on the specified file.
-
- Whenever a log file is opened, it is always opened in
- append mode, so existing data is never truncated. Upon
- opening a log file, a timestamp is written. All user
- input is logged, along with error messages and some
- program responses.
-
-
-
- Sun Release 4.1 Last change: 20 December 1989 8
-
-
-
-
-
-
- POPI(1L) MISC. REFERENCE MANUAL PAGES POPI(1L)
-
-
-
- :create imagename
- Memory is allocated for a new image. This image is then
- swapped with the current image (the result of the last
- transformation).
-
- :run "filename"
- Commands are read and executed from the given filename.
-
- :free imagename
- The memory associated with the named image is freed.
- Any further access to this image becomes impossible.
- This command may be useful in situations where memory
- is very limited, such as a PC.
-
- TRANSFORMATIONS
- The remaining special commands are used to obtain special
- built-in transformations, as described in Chapter 6 of
- "Beyond Photography". In each of these cases, the image
- name is optional, and defaults to "old". In each case
- (except for :melt), the result is stored in "new", and then
- "old" and "new" are swapped as usual. In the case of :melt,
- the transformation is done in place and no swap occurs.
-
- :oil [image-name]
-
- :shear [image-name]
-
- :slice [image-name]
-
- :tile [image-name]
-
- :melt [image-name]
-
- :matte [image-name [gamma]]
- In this case, gamma is an optional floating point
- number (defaults to 7.5). See the book for details.
-
- DIFFERENCES
- There are a number of differences between the Pico inter-
- preter, for which the examples in the book are written, and
- the Popi interpreter as implemented here. Integer evalua-
- tion stack. The current version of the interpreter has an
- integer evaluation stack. For this reason, the sin() and
- cos() functions, have their results multiplied by Z automat-
- ically in order to be significant. A future version of the
- interpreter will provide the option for a floating point
- stack, and a syntax which will handle both cases. Polar
- coordinates. In the book, both cartesian and polar coordi-
- nates are specified with square brackets. The decision of
- whether to interpret the indices as polar or cartesian is
- based on context; if the symbols r and a are used in the
- index expressions, the coordinates are interpreted as polar,
-
-
-
- Sun Release 4.1 Last change: 20 December 1989 9
-
-
-
-
-
-
- POPI(1L) MISC. REFERENCE MANUAL PAGES POPI(1L)
-
-
-
- otherwise they are interpreted as rectangular. Thus, in
- order to use a radius or angle in a cartesian coordinate
- expression, it must be cast, as is done on page 48 of the
- book. By providing a separate syntax for polar and carte-
- sian coordinate references, the problem never occurs.
-
- EXAMPLES
- These examples are mainly taken from the book, with syntax
- modifications where required. The images in the book are
- usually 1000 x 1000 pixels. To produce the same results on
- a smaller image, you may need to multiply any occurences of
- x, y and r by an appropriate scaling factor. The first
- example image generation in the book is
-
- new[x,y] = x + y ; page 17 (3.1)
-
- which produces a number of diagonal stripes, each fading
- from black to white. On a 512 x 512 image, to get the same
- number of stripes, use the transform
-
- new[x,y] = x*2 + y*2
-
- A series of ripples can be produced with
-
- new[x,y] = (x * y) % (Z + 1) ; page 18 (3.2)
-
- or more simply, because all brightness values are inherently
- modulo (Z + 1) unless truncation is turned on
-
- new[x,y] = x * y
-
- A single smooth transition can be accomplished with
-
- new[x,y] = (Z * x * y) / ((X-1) * (Y-1)) ; page 18 (3.3)
-
- The transformation
-
- new[x,y] = x % y
-
- is the same as new[x,y] = x when x < 0 (ie in the lower left
- triangle of the image, with a different effect in the upper
- right half. The trig functions allow transforms such as
-
- new[x,y] = y + sin(x) / 2 ; page 19 (3.5)
-
- which produce a series of sine waves (remember that the
- range of sin(x) is +-Z. An image reminiscent of a radar
- sweep can be produced by
-
- new[x,y] = atan(y - Y/2, x - X/2) * Z / 360 ; page 19 (3.6)
-
- The atan() function has a range of 0 .. 360, so the *Z/360
-
-
-
- Sun Release 4.1 Last change: 20 December 1989 10
-
-
-
-
-
-
- POPI(1L) MISC. REFERENCE MANUAL PAGES POPI(1L)
-
-
-
- rescales to 0 .. Z. This transform is overall providing an
- intensity relative to the angle of a point in polar coordi-
- nates. The transform language provides the current angle as
- the variable a, so this statement can be rewritten as
-
- new[x,y] = a * Z / 360
-
- Polar coordinates can be used to produce an image which
- varies from black in the centre to white on the outside
-
- new[x,y] = r * Z / R ; page 21 (3.11)
-
- or a spiraling effect
-
- new[x,y] = (((a + r) % 16) - 8) * Z / 16 + Z/2 ; page 21 (3.12)
-
- The conditional operator can be used to provide a filled
- black circle
-
- new[x,y] = r > R/2 ? 0 : Z
-
- or black and white patterns such as
-
- new[x,y] = ((x % (5 + y/25)) > 5) ? 0 : Z ; page 20 (3.9)
- new[x,y] = (Z * abs(x % sin(y)) > 10) ? 0 : Z ; page 20 (3.10)
-
- We can also modify existing images using these transforms.
- The previous image can always be referred to as old, or an
- explicitly named image can be used. We can read an image
- (eg of Dennis Ritchie) using
-
- :read "dmr" ; read the image in the file "dmr" and name it dmr.
-
- and then use it in a transform, such as
-
- new[x,y] = Z - dmr[x,y] ; page 22 (3.13)
-
- This produces a negative, which can be written to a file
- with
-
- :write "dmr_neg"
-
- or converted to PostScript and printed with
-
- :genps "| lp -dalw"
-
- Since the new image built during a transformation becomes
- the old image of the following transform, the negative image
- can be re-reversed to produce the original with
-
- new[x,y] = Z - old[x,y] ; reverse the process
-
-
-
-
- Sun Release 4.1 Last change: 20 December 1989 11
-
-
-
-
-
-
- POPI(1L) MISC. REFERENCE MANUAL PAGES POPI(1L)
-
-
-
- In the following examples, we will use old in most of the
- transforms, rather than a particular image name. In prac-
- tice, you would probably use a specifically named image
- instead. Provide a circular frame for an image
-
- new[x,y] = r > R/2 ? 0 : old[x,y]
-
- A solarisation process, that fades in from left to right
-
- new[x,y] = (old[x,y] > (Z*x) / (2 * X)) ? old[x,y] : Z-old[x,y] ; page 22 (3.16)
-
- Generate a relief map
-
- new[x,y] = old[x,y] + (Z/2 - old[x+2,y+2]) ; page 24 (3.19)
-
- Shrink an image
-
- new[x,y] = old[x*2,y*2] ; page 25 (3.24)
-
- An interesting caricature is produced by
-
- new[x,y] = old{sqrt(r * R),a} ; page 34
-
- Note the use of polar coordinates. The reverse transform
- gives a fisheye lens effect:
-
- new[x,y] = old{(r*r)/R, a} ; page 60
-
- The following transform illustrates how an expression can be
- used for the indices of the destination matrix.
-
- new[x, y-old[x,y]/4] = old[x,y] ; page 40
-
- An image can be swirled about the centre with
-
- new[x,y] = old{r, a + r/3}
-
- The following transform uses polar coordinate values in a
- cartesian reference, resulting in something that looks like
- what you'd see in a cylindrical mirror
-
- new[x,y] = old[a * X/A, r * Y/R] ; page 48
-
- The image generated by
-
- new[x,y] = old{ (r/16)*16, (a/16)*16 } ; page 72
-
- is very interesting, in that it is completely unrecognisable
- when viewed up close, but from a distance of a few metres it
- will resolve into the original.
-
- new[x,y] = old{r, a + old{r,a}/8} ; page 68
-
-
-
- Sun Release 4.1 Last change: 20 December 1989 12
-
-
-
-
-
-
- POPI(1L) MISC. REFERENCE MANUAL PAGES POPI(1L)
-
-
-
- This image is a swirl, but with the skew dependant on the
- brightness of the current point.
-
- new[x,y] = x < X/2 ? old[x,y] : old[X-x,y]
- new[x,y] = x > X/2 ? old[x,y] : old[X-x,y]
-
- These transformations do a horizontal mirror reversal about
- the centre of the image. Because faces are usually close
- to, but not exactly, centered, this transform of a face can
- be interesting.
-
- new[x,y] = old[x+(x%32)-16, y] ; page 58
- new[x,y] = old[x+((a+r/10)%32)-16, y]
-
- These transforms applied to a face produce what looks like
- someone peering through a bathroom window.
-
- DRIVERS
- nulldev
- The null device driver is mainly for people with no
- graphics display device for which a driver exists.
- Using this device, data for a PostScript or Epson
- printer can still be generated.
-
- atariterm
- The atari driver is for use with "TERM", a multiplexing
- terminal program for the Atari ST, written by Peter
- Collinson of the University of Kent at Canterbury. It
- is not a driver for running native on an atari.
-
- kermit
- This is a driver for MS-Kermit 2.32 on an IBM PC, which
- is capable of emulating a Tektronix 4010. This provides
- three levels of contrast (nothing, normal and bold).
-
- MGR This driver is for the Bell Core MGR window system. It
- is visually identical to the SunView version, but is
- currently hardwired to monochrome.
-
- NeWS This is the driver that will work with NeWS v1.1 and
- OpenWindows v1.0. It is also visually identical to the
- SunView version.
-
- pcturbo
- This is a driver for running popi native on a PC with
- Borland's Turbo C compiler. It uses the graphics
- library supplied with Turbo C, which auto-detects most
- types of graphics display. No attempt at using a
- colourmap is done - a single display dot is used for
- each image pixel, with simple dithering. Only directly
- accesible memory is used, which drastically restricts
- the size of images that can be handled.
-
-
-
- Sun Release 4.1 Last change: 20 December 1989 13
-
-
-
-
-
-
- POPI(1L) MISC. REFERENCE MANUAL PAGES POPI(1L)
-
-
-
- SunView
- This driver works with the SunView graphics package
- available on Sun workstations. This uses a scrollable
- command window which allows line editing, cutting and
- pasting. The image canvas is a separate window on the
- correct size. The output is in colour on 24-bit colour
- machines, in 256 grayscale on 8-bit colour machines,
- and an 8x8 dither on monochrome screens.
-
- X11 This driver is the initial version to work with MIT's
- X11 window system. This currently has minimal func-
- tionality. The output is in 256 grayscales on colour
- machines, and an 8x8 dither on monochrome screens.
-
- XView
- A conversion of the original SunView graphics driver to
- use the XView X11 toolkit. This driver is visually
- identical to the X11 version. This driver will be
- rewritten to be identical with the new SunView graphics
- driver.
-
- IMAGE FORMAT
- popi use the portable graymap file format for the grayscale
- images, and the portable pixmap file format for its color
- images. These image formats are an integral part of the
- PBMPLUS extended portable bitmap toolkit distributed by Jef
- Poskanzer. See the README file, for the copyright notices
- associated with this package.
-
- popi will automagically read images in the old format, but
- if you have any such images, it is recommended that they be
- converted to pgm files using the small popitopgm filter
- included with this package, as this format may no longer be
- supported in future releases. It is also recommended that
- you get a copy of the PBMPLUS toolkit. popitopgm takes an
- old popi image on standard input, and writes a pgm file to
- standard output. There are two command line options that
- might be applicable for your image conversion:
-
- -x nnn - the width of the image in pixels.
- -y nnn - the height of the image in pixels.
-
- The program defaults these values to 512 if they aren't
- given.
-
- The definition of the portable graymap format is as follows:
-
- - A "magic number" for identifying the file type. A pgm
- file's magic number is the two characters "P2".
-
- - Whitespace (blanks, TABs, CRs, LFs).
-
-
-
-
- Sun Release 4.1 Last change: 20 December 1989 14
-
-
-
-
-
-
- POPI(1L) MISC. REFERENCE MANUAL PAGES POPI(1L)
-
-
-
- - A width, formatted as ASCII characters in decimal.
-
- - Whitespace.
-
- - A height, again in ASCII decimal.
-
- - Whitespace.
-
- - The maximum gray value, again in ASCII decimal.
-
- - Whitespace.
-
- - Width * height gray values, each in ASCII decimal, between
- 0 and the specified maximum value, separated by whi-
- tespace, starting at the top-left corner of the graymap,
- proceding in normal English reading order. A value of 0
- means black, and the maximum value means white.
-
- - Characters from a "#" to the next end-of-line are ignored
- (comments).
-
- - No line should be longer than 70 characters.
-
- Here is an example of a small graymap in this format:
-
- P2
- # feep.pgm
- 24 7
- 15
- 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
- 0 3 3 3 3 0 0 7 7 7 7 0 0 11 11 11 11 0 0 15 15 15 15 0
- 0 3 0 0 0 0 0 7 0 0 0 0 0 11 0 0 0 0 0 15 0 0 15 0
- 0 3 3 3 0 0 0 7 7 7 0 0 0 11 11 11 0 0 0 15 15 15 15 0
- 0 3 0 0 0 0 0 7 0 0 0 0 0 11 0 0 0 0 0 15 0 0 0 0
- 0 3 0 0 0 0 0 7 7 7 7 0 0 11 11 11 11 0 0 15 0 0 0 0
- 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-
- Programs that read this format should be as lenient as pos-
- sible, accepting anything that looks remotely like a gray-
- map.
-
- There is also a variant on the format, available by setting
- the RAWBITS option at compile time. This variant is dif-
- ferent in the following ways:
-
- - The "magic number" is "P5" instead of "P2".
-
- - The gray values are stored as plain bytes, instead of
- ASCII decimal.
-
- - No whitespace is allowed in the grays section.
-
-
-
-
- Sun Release 4.1 Last change: 20 December 1989 15
-
-
-
-
-
-
- POPI(1L) MISC. REFERENCE MANUAL PAGES POPI(1L)
-
-
-
- - The files are smaller and many times faster to read and
- write.
-
- Note that this raw format can only be used for maxvals less
- than or equal to 255.
-
- The definition of the portable pixmap format is as follows:
-
- - A "magic number" for identifying the file type. A ppm
- file's magic number is the two characters "P3".
-
- - Whitespace (blanks, TABs, CRs, LFs).
-
- - A width, formatted as ASCII characters in decimal.
-
- - Whitespace.
-
- - A height, again in ASCII decimal.
-
- - Whitespace.
-
- - The maximum color-component value, again in ASCII decimal.
-
- - Whitespace.
-
- - Width * height pixels, each three ASCII decimal values
- between 0 and the specified maximum value, starting at the
- top-left corner of the pixmap, proceding in normal English
- reading order. The three values for each pixel represent
- red, green, and blue, respectively; a value of 0 means
- that color is off, and the maximum value means that color
- is maxxed out.
-
- - Characters from a "#" to the next end-of-line are ignored
- (comments).
-
- - No line should be longer than 70 characters.
-
- Here is an example of a small pixmap in this format:
-
- P3
- # feep.ppm
- 4 4
- 15
- 0 0 0 0 0 0 0 0 0 15 0 15
- 0 0 0 0 15 7 0 0 0 0 0 0
- 0 0 0 0 0 0 0 15 7 0 0 0
- 15 0 15 0 0 0 0 0 0 0 0 0
-
- Programs that read this format should be as lenient as pos-
- sible, accepting anything that looks remotely like a pixmap.
-
-
-
-
- Sun Release 4.1 Last change: 20 December 1989 16
-
-
-
-
-
-
- POPI(1L) MISC. REFERENCE MANUAL PAGES POPI(1L)
-
-
-
- There is also a variant on the format, available by setting
- the RAWBITS option at compile time. This variant is dif-
- ferent in the following ways:
-
- - The "magic number" is "P6" instead of "P3".
-
- - The pixel values are stored as plain bytes, instead of
- ASCII decimal.
-
- - Whitespace is not allowed in the pixels area.
-
- - The files are smaller and many times faster to read and
- write.
-
- Note that this raw format can only be used for maxvals less
- than or equal to 255.
-
- SEE ALSO
- ipscript(1L), imavg(1L).
-
- AUTHOR
- Gerald J. Holzmann, AT&T Bell Laboratories, Murray Hill, New
- Jersey.
-
- Modifications and additional functionality, Atari, PC,
- PostScript, Epson and null drivers by Stephen Frede, Softway
- Pty Ltd, Australia.
- Popi maintainance, SunView, X11, NeWS, MGR and XView graph-
- ics drivers by Rich Burridge, Sun Microsystems, Australia.
- Kermit graphics driver by Frank Crawford, Q.H. Tours.
- Amiga graphics driver by Peter Chubb, Softway Pty Ltd, Aus-
- tralia.
- Apollo driver by Tim Lambert, University of New South Wales.
- HP driver by Eric Haines, 3D/Eye Inc, Ithaca, NY.
- Popi efficiency changes and improvements to the PC driver by
- Russ Nelson, Clarkson University.
- Color support, signed/unsigned i/o and 24 bit SunView sup-
- port by Rich Morin, Canta Forda Computer Laboratory.
- Dithering code taken from xloadimage, which is copyright (c)
- 1989-1990 by Kirk L. Johnson, Jim Frost and Steve Losen. See
- the README file for the copyright notices associated with
- this code.
- Popi image i/o routines are based on the PBM/PGM/PPM rou-
- tines from the PBMPLUS package, which is copyright (c) 1989
- by Jef Poskanzer. See the README file for the copyright
- notices associated with this code.
-
- BUGS
- Functions which require popen() (ie auto reading of
- compressed files and writing to pipes) don't work in the
- sequent multiprocessor version. Reading of compressed
- images in the old format will no longer work, because you
-
-
-
- Sun Release 4.1 Last change: 20 December 1989 17
-
-
-
-
-
-
- POPI(1L) MISC. REFERENCE MANUAL PAGES POPI(1L)
-
-
-
- can't seek on the pipe from zcat.
-
- Probably more - please notify richb@Aus.Sun.COM of any
- found, if it's not already listed in the TODO file.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Sun Release 4.1 Last change: 20 December 1989 18
-
-
-
- Funky_Stuff
- len=`wc -c < popi.man.text`
- if [ $len != 37480 ] ; then
- echo error: popi.man.text was $len bytes long, should have been 37480
- fi
- fi # end of overwriting check
- exit 0 # Just in case...
-