AUTHOR

  The author is cristy@dupont.com.  Comments, suggestions, or bug
  reports are welcome, but be kind.  This software is NOT shareware.
  However, I am interested in who might be using it.  Please consider
  sending me a picture postcard of the area where you live.  Send
  postcards to

    John Cristy
    5 Middleton Lane
    Landenberg, PA  19350
    USA


AVAILABLILITY

  Anonymous FTP at ftp.x.org, file contrib/ImageMagick2.3.4.tar.Z.


UNIX COMPILATION

  Type:

    uncompress ImageMagick.tar.Z
    tar xvf ImageMagick.tar
    cd ImageMagick
    xmkmf
    make Makefiles
    make

  If you do not have 'xmkmf', edit 'Makefile' as required by your
  hardware environment and type 'make'.

  Finally type:

    display images/aquarium.miff
    display -monochrome -dither images/aquarium.miff

  If the image colors are not correct use this command:

    display -visual default images/aquarium.miff

  You can find other example images in the 'images' directory.

  Be sure to read the manual pages for the display, animate, montage,
  import, mogrify, and convert utilities.

  The ImageMagick utilites read and write MIFF images.  Refer to the
  end of this message for more information about MIFF.  Use `convert'
  to convert images to and from the MIFF format.

  Some ImageMagick utilities recognizes these image formats:

       Tag       Description
       ----------------------------------------------------
       AVS       AVS X image file
       BMP       Microsoft Windows bitmap image file
       EPS       Adobe Encapsulated Postscript
       GIF       Compuserve Graphics image file
       JPEG
       PCX       ZSoft IBM PC Paintbrush file
       PICT      Apple Macintosh QuickDraw/PICT file
       PNM       Portable bitmap
       PS        Adobe PostScript file
       RLE       Utah Raster Toolkit
       SUN       SUN raster
       TGA       Truevision Targa image file
       TIFF      Tagged Image File Format
       VICAR
       VIFF      Khoros Visualization image file.
       XBM       X11 bitmap
       XWD       X11 window dump

  and for your convenience automatically converts the alien image
  format to MIFF at execution time.  However, the MIFF image format has
  several advantages over most image formats (i.e. runlength encoding,
  digital signature on an image colormap, etc.).  ImageMagick is
  designed to exploit these advantages.  Whenever possible convert an
  alien image format to the MIFF format before using the various
  ImageMagick programs.

  Other formats are also recognized.  See CONVERT(1) for a list of
  valid image formats.  You can specify a particular image format by
  prefixing the image filename with the image type and a colon (i.e.
  ps:image.ps).

  ImageMagick requires GNU's Ghostscript software available via FTP as
  ftp.uu.net:systems/gnu/ghostscript-2.6.1.tar.gz to read the
  Postscript format.  For ImageMagick to read Postscript files, `gs'
  must be in your execution path and the `pbmraw' and `ppmraw' devices
  must be recognized (try gs -h to verify).  If they are not defined, add
  them to your 'DEVICE_DEVS' define in your Ghostscript `Makefile' and
  recompile (i.e. DEVICE_DEVS=x11.dev pbmraw.dev ppmraw.dev).

  ImageMagick requires the Independent JPEG Group's software available via 
  FTP as ftp.uu.net:graphics/jpeg/jpegsrc.v4.tar.Z to read the JPEG image
  format.

  ImageMagick requires Sam Leffler's TIFF software available via FTP as 
  sgi.com:graphics/tiff/v3.2beta.tar.Z to read the TIFF image format. If
  you have an ANSI compiler, try sgi.com:graphics/tiff/v3.3beta002.src.tar.Z.

  To display images in the JPEG or TIFF format, get the JPEG and TIFF
  archives and build ImageMagick as follows:

    cd ImageMagick
    mkdir jpeg
    cd jpeg
    zcat jpegsrc.v4.tar.Z | tar xvof -
    cp jmemnobs.c jmemsys.c
    cp makefile.unix Makefile
    make libjpeg.a
    cd ..
    mkdir tiff
    cd tiff
    zcat v3.2beta.tar.Z | tar xvof -
    cd libtiff
    cp Makefile.sun Makefile
    make
    cd ../..
    < edit Magick.tmpl and define HasJPEG and HasTIFF lines as instructed >
    touch decode.c
    touch encode.c
    xmkmf
    make Makefiles
    make

  You can now display images in the JPEG or TIFF format.

  If you have a colormapped X server, the number of unique colors in an
  image must first be reduced to match the requirements of your server
  before it can be displayed.  ImageMagick tries to make the color reduced
  image closely resemble the original.  However, this process can be
  time consuming.  To speed it up, ImageMagick trades image quality for
  processing time.  For the "best" image possible, type

      display -colors 256 -dither image.jpeg

  or add this to your X resources file:

      display.colors: 256

  This example assumes your server supports 256 colors.  Choose
  whatever value is appropriate for your X server.  Alternatively if
  you intend to view the image frequently, reduce the number of colors
  to match the resolution of your X server once and write to a new
  image.  Then display this new image.  For example,

      convert -colors 256 -dither image.jpeg image.miff
      display image.miff

  The default dimensions of a Postscript page is 612x792.  If you prefer
  another default, change the PageWidth and PageHeight defines in encode.c.


VMS COMPILATION

  Type

    @make
    set display/create/node=node_name::

  where node_name is the DECNET X server to contact.

  Finally type:

    display images/aquarium.miff
    display -monochrome -dither images/aquarium.miff


ANIMATION

  An example animation sequence is available from anonymous FTP at
  ftp.x.org, file contrib/ImageMagick.animation.tar.Z Or
  alternatively, you can create this sequence yourself.  Just look at
  README in the scenes directory.
  
  To prevent color flashing on visuals that have colormaps, `animate'
  creates a single colormap from the image sequence.  This can be
  rather time consuming.  You can speed this operation up by reducing
  the colors in the image before you `animate' them.  Use `mogrify' to
  color reduce the images:

    mogrify -colors 256 scenes/dna.[0-9]*

  Note, the image sequence in ImageMagick.animation.tar.Z is already
  reduced.  Alternatively, you can use a Standard Colormap; or a
  static, direct, or true color visual.  You can define a Standard
  Colormap with `xstdcmap'.  For example, to use the "best" Standard
  Colormap, type:

    xstdcmap -best
    animate -map best scenes/dna.[0-9]*

  or to use a true color visual:

    animate -visual truecolor scenes/dna.[0-9]*

  Image filenames can appear in any order on the command line if the
  scene keyword is specified in the MIFF image.  Otherwise the images
  display in the order they appear on the command line.  A scene is
  specified when converting from another image format to MIFF by using
  the "scene" option with any filter.  Be sure to choose a scene number
  other than zero.  For example, to convert a TIFF image to a MIFF
  image as scene #2, type:

    convert -scene 2 image.tiff image.miff


NOTES

  1.  If you get a compile error on XTextProperty in PreRvIcccm.h,
      change it to _XTextProperty. If you get a compile error on
      XVisualIDFromVisual in PreRvIcccm.c, change it to
      _XVisualIDFromVisual.

  2.  24 bit images are reduced to 244 colors on an 8 bit display to
      help prevent colormap flashing.  If you want all 256 colors, type

        display -colors 256 image.miff

      To further help reduce colormap flashing, do not install the
      default standard colormap (RGB_DEFAULT_MAP).

  3.  Machine dependancies:

      For MacX, set the DISPLAY variable to host:0.2 for the color
      rootless window.

      I suspect all the following problems will be fixed when these
      vendors upgrade to X11R4.  I find conditional compilation
      statements offensive.  So if you have any of the following
      problems, the fix must be applied manually.

      MIPS does not always generate exposure events correctly when
      displaying a monochrome image on their color server.  Holes in the
      image may appear when an area is blocked then exposed.  I do not
      currently have a solution for this problem.

      Images do not dislay correctly on the IBM R6000 visual with 4096
      colors.  However they do display correctly on the visual with 256
      colors.  Until IBM fixes their server, type xdpyinfo to determine 
      the ID of the 256 color visual and type

        display -visual 0x???? image.miff

      On the Stardent put

        *installColormap:  on

      in your X resource file.

      Digital and Tektronix has a bug in their servers.  When converting
      from LSBFirst to MSBFirst X server (or visa-versa) you may get the 
      error

        Illegal unit size: 8 found in routine: _normalizeimagebits

      On some HP's you may get a memory fault when exiting display(1).
      To fix this problem comment out the XCLoseDisplay line near the
      last line of display.c and recompile.  Under HPUX 9.0 the compiler
      has a bug.  You might have to compile image.c unoptimized to
      prevent bus errors with montage(1).

  4.  On occasion, a window manager (twm) may get in strange state which will 
      cause the display program to work improperly.  Fix this by restarting the
      window manager.

  5.  If the image is displayed with incorrect colors, try using a different
      visual.  Type xdpyinfo and choose an alternative visual (if one exists)
      by either visual class or visual id.  For example, to specifically 
      choose a PseudoColor visual on a server that supports it, type

        display -visual pseudocolor image.miff

  6.  Make sure that the include file math.h defines the function atof as
      type double.  Otherwise the -gamma option will not work properly.

  7.  If you get a compile error on "WithdrawnState", replace
      "WithdrawnState" with "0";


MIFF IMAGE FORMAT

  MIFF is an image format which I developed.  I like it because it

    1) It is machine independant.  It can be read on virtually any
       computer.  No byte swapping is necessary.

    2) It has a text header.  Most image formats are coded in binary
       and you cannot easily tell attributes about the image.  Use
       'more' on MIFF image files and the attributes are displayed in
       text form.

    3) It can handle runlength-encoded images.  Although most scanned
       images do not benefit from runlength-encoding, most
       computer-generated images do.  Images of mostly uniform colors
       have a high compression ratio and therefore take up less memory
       and disk space.

    4) It allows a scene number to be specified.  This allows you to
       specify an animation sequence out-of-order on the command line.
       The correct order is determined by the scene number of each
       image.

    5) MIFF computes a digital signature for colormapped images.  This
       is useful for animating a sequence of images on a colormapped X
       server.  If all signatures match in the image sequence,
       computing a global colormap is not necessary.

  One way to get an image into MIFF format is to use `convert'.  or
  read it from an X window using the 'import' program.  Alternatively,
  type the necessary header information in a file with a text editor.
  Next, dump the binary bytes into another file.  Finally, type

    cat header binary_image | display -write image.miff -

  For example, suppose you have a raw red, green, blue image file on
  disk that is 640 by 480.  The header file would look like this:

    id=ImageMagick columns=640 rows=480 :

  The image file would have red, green, blue tuples (rgbrgbrgb...).

  Refer to the 'display' manual page for more details.

COPYRIGHT

  Copyright 1993 E. I. du Pont de Nemours & Company

  Permission to use, copy, modify, distribute, and sell this software and
  its documentation for any purpose is hereby granted without fee,
  provided that the above copyright notice appear in all copies and that
  both that copyright notice and this permission notice appear in
  supporting documentation, and that the name of E. I. du Pont de Nemours
  & Company not be used in advertising or publicity pertaining to
  distribution of the software without specific, written prior
  permission.  E. I. du Pont de Nemours & Company makes no representations
  about the suitability of this software for any purpose.  It is provided
  "as is" without express or implied warranty.

  E. I. du Pont de Nemours & Company disclaims all warranties with regard
  to this software, including all implied warranties of merchantability
  and fitness, in no event shall E. I. du Pont de Nemours & Company be
  liable for any special, indirect or consequential damages or any
  damages whatsoever resulting from loss of use, data or profits, whether
  in an action of contract, negligence or other tortious action, arising
  out of or in connection with the use or performance of this software.
