Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ display(1) — Dell System V Release 4 Issue 2.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

X(1)

xcmap(1)

import(1)

XtoPS(1)

more(1)

compress(1)



DISPLAY(1)                 X Version 11(1 July 1991)                 DISPLAY(1)


NAME
      display - display an image on any workstation running X

SYNOPSIS
      display [ options ...] file [ [ options ...] file ...]

DESCRIPTION
      Display is a machine architecture independent image processing and
      display program.  It can display any image in the MIFF format on any
      workstation display running an X server.  Display first determines the
      hardware capabilities of the workstation.  If the number of unique colors
      in the image is less than or equal to the number the workstation can
      support, the image is displayed in an X window.  Otherwise the number of
      colors in the image is first reduced to match the color resolution of the
      workstation before it is displayed.

      This means that a continuous-tone 24 bits/pixel image can display on a 8
      bit pseudo-color device or monochrome device.  In most instances the
      reduced color image closely resembles the original.  Alternatively, a
      monochrome or pseudo-color image can display on a continuous-tone 24
      bits/pixels device.

EXAMPLES
      To scale an image of a cockatoo to exactly 640 pixels in width and 480
      pixels in height and position the window at location (200,200), use:

           display -geometry 640x480+200+200 cockatoo.miff

      To display an image of a cockatoo without a border centered on a
      backdrop, use:

           display -backdrop -borderwidth 0 cockatoo.miff

      To tile an image of a cockatoo onto the root window, use:

           display -window root cockatoo.miff

OPTIONS
      -backdrop
           display the image centered on a backdrop.

           This backdrop covers the entire workstation screen and is useful for
           hiding other X window activity while viewing the image.   The color
           of the backdrop is specified as the background color.  Refer to X
           RESOURCES for details.

      -clip <width>x<height>{+-}<x offset>{+-}<y offset>
           preferred size and location of the clipped image.  See X(1) for
           details about the geometry specification.

           Use clipping to apply image processing options, or display, only a
           particular area of an image.


10/89                                                                    Page 1







DISPLAY(1)                 X Version 11(1 July 1991)                 DISPLAY(1)


           The equivalent X resource for this option is clipGeometry (class
           ClipGeometry).  See X RESOURCES for details.

      -colors value
           preferred number of colors in the image.

           The actual number of colors in the image may be less than your
           request, but never more.  Note, this is a color reduction option.
           Images with less unique colors than specified with this option will
           remain unchanged.  Refer to COLOR REDUCTION ALGORITHM for more
           details.

           Note, options -dither and -treedepth affect the color reduction
           algorithm.

      -compress type
           the type of image compression: QEncoded or RunlengthEncoded.

           Use this option with -write to specify the the type of image
           compression.  See MIFF FILE FORMAT for details.

           Specify +compress to store the binary image in an uncompressed
           format.  The default is the compression type of the specified image
           file.

      -delay seconds
           display the next image after pausing.

           This option is useful when viewing several images in sequence.  Each
           image will display and wait the number of seconds specified before
           the next image is displayed.  The default is to display the image
           continuously until you terminate it.

      -display host:display[.screen]
           specifies the X server to contact; see X(1).

      -dither
           apply Floyd/Steinberg error diffusion to the image.

           The basic strategy of dithering is to trade intensity resolution for
           spatial resolution by averaging the intensities of several
           neighboring pixels.  Images which suffer from severe contouring when
           reducing colors can be improved with this option.

           The -colors, -gray, or -monochrome option is required for this
           option to take effect.

      -enhance
           apply a digital filter to enhance a noisy image.





Page 2                                                                    10/89







DISPLAY(1)                 X Version 11(1 July 1991)                 DISPLAY(1)


      -gamma value
           level of gamma correction.

           The same color image displayed on two different workstations may
           look different due to differences in the display monitor.  Use gamma
           correction to adjust for this color difference.  Reasonable values
           extend from 0.8 to 2.3.

      -geometry <width>x<height>{+-}<x offset>{+-}<y offset>
           preferred size and location of the image window.  See X(1) for
           details about the geometry specification.  By default, the window
           size is the image size and the location is choosen by you when it is
           mapped.

           If the specified image size is smaller than the actual image size,
           the image is first reduced to an integral of the specified image
           size with an antialias digital filter.  The image is then scaled to
           the exact specified image size with pixel replication.  If the
           specified image size is greater than the actual image size, the
           image is first enlarged to an integral of the specified image size
           with bilinear interpolation.  The image is then scaled to the exact
           specified image size with pixel replication.

           When displaying an image on an X server, the x and y offset in the
           geometry specification is relative to the root window.  When
           printing an image, the x and y offset in the geometry specification
           is relative to a Postscript page.  See -print for more details.

           The equivalent X resource for this option is imageGeometry (class
           ImageGeometry).  See X RESOURCES for details.

      -gray
           transform the image to gray scale colors.

      -inverse
           apply color inversion to image.

           The red, green, and blue intensities of an image are negated.

      -magnify value
           specifies an integral factor by which the image should be enlarged.
           The default is 2.

           This value only affects the magnification window which is invoked
           with button number 1 after the image is displayed.  Refer to BUTTONS
           for more details.

      -map type
           display image using this Standard Colormap type.

           Choose from these Standard Colormap types:



10/89                                                                    Page 3







DISPLAY(1)                 X Version 11(1 July 1991)                 DISPLAY(1)


               default
               best
               red
               green
               blue
               gray

           The X server must support the Standard Colormap you choose,
           otherwise an error occurs.  See xcmap(1) for one way of creating
           Standard Colormaps.

      -monochrome
           transform the image to black and white.

           Monochrome images can benefit from error diffusion.  Use -dither
           with this option to diffuse the error.

      -noise
           reduce the noise in an image with a noise peak elimination filter.

           The principal function of noise peak elimination filter is to smooth
           the objects within an image without losing edge information and
           without creating undesired structures.  The central idea of the
           algorithm is to replace a pixel with its next neighbor in value
           within a 3 x 3 window, if this pixel has been found to be noise.  A
           pixel is defined as noise if and only if this pixel is a maximum or
           minimum within the 3 x 3 window.

      -normalize
           tranform image to span the full range of color values.

      -print file
           write image as encapsulated Postscript to a file.

           You can view the file with any Postscript compatible viewer or
           printer.  The image is displayed as color on viewers and printers
           that support color Postscript, otherwise it is displayed as
           grayscale.

           If file already exists, you will be prompted as to whether it should
           be overwritten.

           By default, the image is scaled and centered to fit on an 612x792
           point Postscript page.  To specify a specific image size or a
           particular location on the Postscript page, use -geometry.

           By default the image is output in portrait mode.  Use -rotate 90 to
           display the image in landscape mode.

           The equivalent X resource for this option is printFilename (class
           PrintFilename).  See X RESOURCES for details.



Page 4                                                                    10/89







DISPLAY(1)                 X Version 11(1 July 1991)                 DISPLAY(1)


      -reflect
           create a "mirror image" by reflecting the image scanlines.

      -rotate degrees
           apply Paeth image rotation to the image.

      -scale <width factor>x<height factor>
           preferred size factors of the image.

           This option behaves like -geometry except the width and height
           values are relative instead of absolute.  The image size is
           multiplied by the width and height factors to obtain the final image
           dimensions.  If only one factor is specified, both the width and
           height factors assume the value.

           Factors may be fractional.  For example, a factor of 1.5 will
           increase the image size by one and one-half.

           The equivalent X resource for this option is scaleGeometry (class
           ScaleGeometry).  See X RESOURCES for details.

      -scene number
           image scene number.

      -treedepth value
           Normally, this integer value is zero or one.  A zero or one tells
           Display to choose a optimal tree depth for the color reduction
           algorithm.

           An optimal depth generally allows the best representation of the
           source image with the fastest computational speed and the least
           amount of memory.  However, the default depth is inappropriate for
           some images.  To assure the best representation, try values between
           2 and 8 for this parameter.  Refer to COLOR REDUCTION ALGORITHM for
           more details.

           The -colors, -gray, or -monochrome option is required for this
           option to take effect.

      -verbose
           print detailed information about the image.

           This information is printed: image scene number;  image name;  image
           size; the image class (DirectClass or PseudoClass); the total number
           of unique colors (if known);  and the number of seconds to read and
           transform the image.  Refer to MIFF FILE FORMAT for a description of
           the image class.

           If -colors is also specified, the total unique colors in the image
           and color reduction error values are printed.  Refer to MEASURING
           COLOR REDUCTION ERROR for a description of these values.



10/89                                                                    Page 5







DISPLAY(1)                 X Version 11(1 July 1991)                 DISPLAY(1)


      -visual type
           display image using this visual type.

           Choose from these visual classes:

               StaticGray
               GrayScale
               StaticColor
               PseudoColor
               TrueColor
               DirectColor
               default
               visual id

           The X server must support the visual you choose, otherwise an error
           occurs.  If a visual is not specified, the visual class that can
           display the most simultaneous colors on the default screen is
           choosen.

      -window id
           set the background pixmap of this window to the image.

           d can be a window id or name.  Specify 'root' to select X's root
           window as the target window.

           By default the image is tiled onto the background of the target
           window.   If -backdrop or -geometry are specified, the image is
           surrounded by the background color.  Refer to X RESOURCES for
           details.

           The image will not display on the root window if the image has more
           unique colors than the target window colormap allows.  Use -colors
           to reduce the number of colors.

      -write file
           write image to a file.

           The image is stored in the MIFF image format.  If the number of
           unique colors in the image exceed 65535, it is stored as
           DirectClass; otherwise, it is stored as PseudoClass format.  Refer
           to MIFF FILE FORMAT for more details.

           Use -compress to specify the type of image compression.

           If file has the extension .Z, the file size is reduced using
           Lempel-Ziv coding with compress.  If file already exists, you will
           be prompted as to whether it should be overwritten.

           The equivalent X resource for this option is writeFilename (class
           WriteFilename).  See X RESOURCES for details.




Page 6                                                                    10/89







DISPLAY(1)                 X Version 11(1 July 1991)                 DISPLAY(1)


      In addition to those listed above, you can specify these standard X
      resources as command line options:  -background, -bordercolor,
      -borderwidth,  -font, -foreground, -iconGeometry, -iconic, -name, or
      -title. See X RESOURCES for details.

      Any option you specify on the command line remains in effect until it is
      explicitly changed by specifying the option again with a different
      effect.  For example, to display two images, the first with 32 colors and
      the second with only 16 colors, use:

           display -colors 32 cockatoo.miff -colors 16 macaw.miff

      Change - to + in any option above to reverse its effect.  For example,
      specify +display to apply image transformations without viewing them on
      the X server.  Or, specify +compress to store the binary image in an
      uncompressed format.

      Specify file as - for standard input or output.  If file has the
      extension .Z, the file is decoded with uncompress.

BUTTONS
      Control-1
           Press and drag to pan the image.

      1    Press and drag to select a command from a pop-up menu.  Choose from
           these commands:

               Image Info
               Write Image
               Print Image
               Annotate Image
               Reflect Image
               Rotate Right
               Rotate Left
               Half Size
               Double Size
               Restore Image
               Next Image
               Quit

      2    Press and drag to define a region of the image to clip.  Release the
           button to crop the image, or return the pointer to the location of
           the initial button press to cancel the cropping operation.

      3    Press and drag to define a region of the image to magnify.

KEYS
      i    Press to display information about the image.  Press any key or
           button to erase the information.

           This information is printed: image name;  image size; the visual
           class (see -visual); and the total number of unique colors in the


10/89                                                                    Page 7







DISPLAY(1)                 X Version 11(1 July 1991)                 DISPLAY(1)


           image.

      w    Press to write the image to a file.

      p    Press to print the image to a file.

      a    Press to annotate the image with text.

           Refer to IMAGE ANNOTATION for more details.

      r    Press to reflect the image scanlines.

      /    Press to rotate the image 90 degrees clockwise.

      \    Press to rotate the image 90 degrees counter-clockwise.

      <    Press to half the image size.

      >    Press to double the image size.

      o    Press to restore the image to its original size.

      n    Press to display the next image.

      q    Press to discard all images and exit program.

      1-9  Press to change the level of magnification.

X RESOURCES
      Display options can appear on the command line or in your X resource
      file.  Options on the command line supercede values specified in your X
      resource file.  See X(1) for more information on X resources.

      All display options have a corresponding X resource.  In addition, the
      display program uses the following X resources:

      background (class Background)
           Specifies the preferred color to use for the image window
           background.  The default is black.

      borderColor (class BorderColor)
           Specifies the preferred color to use for the image window border.
           The default is white.

      borderWidth (class BorderWidth)
           Specifies the width in pixels of the image window border.  The
           default is 2.

      font (class Font)
           Specifies the name of the preferred font to use when displaying text
           within the image window.  The default is 9x15, fixed, or 5x8
           determined by the image window size.


Page 8                                                                    10/89







DISPLAY(1)                 X Version 11(1 July 1991)                 DISPLAY(1)


      font[1-9] (class Font[1-9])
           Specifies the name of the preferred font to use when annotating the
           image window with text.  The default fonts are fixed, variable, 5x8,
           6x10, 7x13bold, 8x13bold, 9x15bold, 10x20, and 12x24. Refer to IMAGE
           ANNOTATION for more details.

      foreground (class Foreground)
           Specifies the preferred color to use for text within the image
           window.  The default is white.

      iconGeometry (class IconGeometry)
           Specifies the preferred size and position of the application when
           iconified.  It is not necessarily obeyed by all window managers.

      iconic (class Iconic)
           This resource indicates that you would prefer that the application's
           windows initially not be visible as if the windows had be
           immediately iconified by you.  Window managers may choose not to
           honor the application's request.

      name (class Name)
           This resource specifies the name under which resources for the
           application should be found.  This resource is useful in shell
           aliases to distinguish between invocations of an application,
           without resorting to creating links to alter the executable file
           name.  The default is the application name.

      pen[1-9] (class Pen[1-9])
           Specifies the color of the preferred font to use when annotating the
           image window with text.  The default colors are black, blue, green,
           cyan, gray, red, magenta, yellow, and white.  Refer to IMAGE
           ANNOTATION for more details.

      title (class Title)
           This resource specifies the title to be used for the image window.
           This information is sometimes used by a window manager to provide
           some sort of header identifying the window.  The default is the
           image file name.

IMAGE ANNOTATION
      An image is annotated with text interactively.  There is no command line
      argument to annotate an image.  To begin, press button 1 and choose
      Annotate Image from the command menu (see BUTTONS).  Alternatively, press
      a in the image window (see KEYS).  The cursor will change to a pencil to
      indicate you are in image annotation mode.  To exit immediately, press
      button 1 followed by ESC.

      In image annotation mode, a button press has a different effect than
      described in BUTTONS.  Press a button to affect this behavior:





10/89                                                                    Page 9







DISPLAY(1)                 X Version 11(1 July 1991)                 DISPLAY(1)


      1    Press to select a location within the image window to begin entering
           text.

      2    Press and drag to select a font from a pop-up menu.  Choose from
           these fonts:

               fixed
               variable
               5x8
               6x10
               7x13bold
               8x13bold
               9x15bold
               10x20
               12x24

           Other fonts can be specified by setting the X resources font1
           through font9.  Refer to X RESOURCES for more details.

      3    Press and drag to select a font color from a pop-up menu.  Choose
           from these font colors:

               black
               blue
               cyan
               green
               gray
               red
               magenta
               yellow
               white

           Other font colors can be specified by setting the X resources pen1
           through pen9.  Refer to X RESOURCES for more details.

      Choosing a font and its color is optional.  The default font is fixed and
      the default color is black.  However, you must choose a location to begin
      entering text and press button 1.  An underscore character will appear at
      the location of the cursor where button 1 was pressed.  The underscore
      indicates you are in text entering mode.  To exit immediately, press ESC.

      In text entering mode, any key presses will display the character at the
      location of the underscore and advance the underscore cursor.  Enter your
      text and once completed press ESC to finish your image annotation.  To
      correct errors press BACK SPACE.  To delete an entire line of text, press
      DELETE.  Any text that exceeds the boundaries of the image window is
      automatically continued onto the next line.

      Before exiting image annotation mode, immediately after pressing the ESC
      key, the image is permanently updated with the text you entered.  There
      is no way to `undo' your changes so be careful to check your text before
      you press ESC.


Page 10                                                                   10/89







DISPLAY(1)                 X Version 11(1 July 1991)                 DISPLAY(1)


      The actual color you request for the font is saved in the image.
      However, the color that appears in your image window may be different.
      For example, on a monochrome screen the text will appear black or white
      even if you choose the color red as the font color.  However, the image
      saved to a file with -write will be written with red lettering.  To
      assure the correct color text in the final image, any PseudoClass image
      is promoted to DirectClass (see MIFF FILE FORMAT).  To force a
      PseudoClass image to remain PseudoClass, use -colors.

COLOR REDUCTION ALGORITHM
      This section describes how Display performs color reduction in an image.
      To fully understand this section, you should have a knowledge of basic
      imaging techniques and the tree data structure and terminology.

      For purposes of color allocation, an image is a set of n pixels, where
      each pixel is a point in RGB space.  RGB space is a 3-dimensional vector
      space, and each pixel, pi,  is defined by an ordered triple of red,
      green, and blue coordinates, (ri, gi, bi).

      Each primary color component (red, green, or blue) represents an
      intensity which varies linearly from 0 to a maximum value, cmax, which
      corresponds to full saturation of that color.  Color allocation is
      defined over a domain consisting of the cube in RGB space with opposite
      vertices at (0,0,0) and (cmax,cmax,cmax).  Display requires cmax = 255.

      The algorithm maps this domain onto a tree in which each node represents
      a cube within that domain.  In the following discussion, these cubes are
      defined by the coordinate of two opposite vertices: The vertex nearest
      the origin in RGB space and the vertex farthest from the origin.

      The tree's root node represents the the entire domain, (0,0,0) through
      (cmax,cmax,cmax).  Each lower level in the tree is generated by
      subdividing one node's cube into eight smaller cubes of equal size.  This
      corresponds to bisecting the parent cube with planes passing through the
      midpoints of each edge.

      The basic algorithm operates in three phases:  Classification, Reduction,
      and Assignment.  Classification builds a color description tree for the
      image.  Reduction collapses the tree until the number it represents, at
      most, is the number of colors desired in the output image.  Assignment
      defines the output image's color map and sets each pixel's color by
      reclassification in the reduced tree.

      Classification begins by initializing a color description tree of
      sufficient depth to represent each possible input color in a leaf.
      However, it is impractical to generate a fully-formed color description
      tree in the classification phase for realistic values of cmax.  If color
      components in the input image are quantized to k-bit precision, so that
      cmax = 2k-1, the tree would need k levels below the root node to allow
      representing each possible input color in a leaf.  This becomes
      prohibitive because the tree's total number of nodes is



10/89                                                                   Page 11







DISPLAY(1)                 X Version 11(1 July 1991)                 DISPLAY(1)


              ≳ k
                 i=1 8k
      A complete tree would require 19,173,961 nodes for k = 8, cmax = 255.
      Therefore, to avoid building a fully populated tree, Display: (1)
      Initializes data structures for nodes only as they are needed; (2)
      Chooses a maximum depth for the tree as a function of the desired number
      of colors in the output image (currently log4(colormap size)+2).  A tree
      of this depth generally allows the best representation of the source
      image with the fastest computational speed and the least amount of
      memory.  However, the default depth is inappropriate for some images.
      Therefore, the caller can request a specific tree depth.

      For each pixel in the input image, classification scans downward from the
      root of the color description tree.  At each level of the tree, it
      identifies the single node which represents a cube in RGB space
      containing the pixel's color.  It updates the following data for each
      such node:

      n1:  Number of pixels whose color is contained in the RGB cube which this
           node represents;

      n2:  Number of pixels whose color is not represented in a node at lower
           depth in the tree;  initially,  n2 = 0 for all nodes except leaves
           of the tree.

      Sr, Sg, Sb:
           Sums of the red, green, and blue component values for all pixels not
           classified at a lower depth.  The combination of these sums and n2
           will ultimately characterize the mean color of a set of pixels
           represented by this node.

      Reduction repeatedly prunes the tree until the number of nodes with n2  >
      0 is less than or equal to the maximum number of colors allowed in the
      output image.  On any given iteration over the tree, it selects those
      nodes whose n1 count is minimal for pruning and merges their color
      statistics upward.  It uses a pruning threshold, np, to govern node
      selection as follows:

        np = 0
        while number of nodes with (n2 > 0) > required maximum number of colors
            prune all nodes such that n1 <= np
            Set np  to minimum n1  in remaining nodes

      When a node to be pruned has offspring, the pruning procedure invokes
      itself recursively in order to prune the tree from the leaves upward.
      The values of n2  Sr, Sg,  and Sb in a node being pruned are always added
      to the corresponding data in that node's parent.  This retains the pruned
      node's color characteristics for later averaging.

      For each node,  n2 pixels exist for which that node represents the
      smallest volume in RGB space containing those pixel's colors.  When n2  >
      0 the node will uniquely define a color in the output image.  At the


Page 12                                                                   10/89







DISPLAY(1)                 X Version 11(1 July 1991)                 DISPLAY(1)


      beginning of reduction, n2 = 0  for all nodes except the leaves of the
      tree which represent colors present in the input image.

      The other pixel count, n1,  indicates the total number of colors within
      the cubic volume which the node represents.  This includes n1 - n2 pixels
      whose colors should be defined by nodes at a lower level in the tree.

      Assignment generates the output image from the pruned tree.  The output
      image consists of two parts:  (1)  A color map, which is an array of
      color descriptions (RGB triples) for each color present in the output
      image; (2)  A pixel array, which represents each pixel as an index into
      the color map array.

      First, the assignment phase makes one pass over the pruned color
      description tree to establish the image's color map.  For each node with
      n2 > 0, it divides Sr, Sg, and Sb by n2.  This produces the mean color of
      all pixels that classify no lower than this node.  Each of these colors
      becomes an entry in the color map.

      Finally, the assignment phase reclassifies each pixel in the pruned tree
      to identify the deepest node containing the pixel's color.  The pixel's
      value in the pixel array becomes the index of this node's mean color in
      the color map.

MEASURING COLOR REDUCTION ERROR
      Depending on the image, the color reduction error may be obvious or
      invisible.  Images with high spatial frequencies (such as hair or grass)
      will show error much less than pictures with large smoothly shaded areas
      (such as faces).  This is because the high-frequency contour edges
      introduced by the color reduction process are masked by the high
      frequencies in the image.

      To measure the difference between the original and color reduced images
      (the total color reduction error), Display sums over all pixels in an
      image the distance squared in RGB space between each original pixel value
      and its color reduced value. Display prints several error measurements
      including the mean error per pixel, the normalized mean error, and the
      normalized maximum error.

      The normalized error measurement can be used to compare images.  In
      general, the closer the mean error is to zero the more the quantized
      image resembles the source image.  Ideally, the error should be
      perceptually-based, since the human eye is the final judge of
      quantization quality.

      These errors are measured and printed when -verbose and -colors are
      specified on the command line:

      mean error per pixel:
           is the mean error for any single pixel in the image.




10/89                                                                   Page 13







DISPLAY(1)                 X Version 11(1 July 1991)                 DISPLAY(1)


      normalized mean square error:
           is the normalized mean square quantization error for any single
           pixel in the image.

           This distance measure is normalized to a range between 0 and 1.  It
           is independent of the range of red, green, and blue values in the
           image.

      normalized maximum square error:
           is the largest normalized square quantization error for any single
           pixel in the image.

           This distance measure is normalized to a range between 0 and 1.  It
           is independent of the range of red, green, and blue values in the
           image.

MIFF FILE FORMAT
      The Machine Independent File Format is described in this section.

      A MIFF image file consist of two sections.  The first section is composed
      of keywords describing the image in text form.  The next section is the
      binary image data.  The two sections are separated by a : character
      immediately followed by a newline.  Generally, the first section has a
      form-feed and newline proceeding the : character.   You can then list the
      image keywords with more, without printing the binary image that follows
      the :  separator.

      Each keyword must be separated by at least one space but can be separated
      with control characters such a form-feed or newline.

      A list of valid keywords follows:

      class=DirectClass | PseudoClass
           identifies the type of binary image stored within the file.

           This keyword is optional.  If it is not specified, a DirectClass
           image format is assumed.  An explanation of DirectClass and
           PseudoClass image data follows this list.

      colors=value
           specifies the number of colors in the image, and for pseudo-color
           images the size of the colormap.

           This keyword is optional.  However, if a colormap size is not
           specified, a linear colormap is assumed for pseudo-color images.

      columns=value
           is a required keyword and specifies the number of columns, or width
           in pixels, of the image.





Page 14                                                                   10/89







DISPLAY(1)                 X Version 11(1 July 1991)                 DISPLAY(1)


      compression=QEncoded | RunlengthEncoded
           identifies how the image stored within the file is compressed.

           This keyword is optional.  If it is not specified, the image is
           assumed to be uncompressed.  A detailed explanation of runlength-
           encoded and predictive arithmetic image compression follows this
           list.

      id=ImageMagick
           is a required keyword and identifies this file as a MIFF image.

      packets=value
           specifies the number of compressed color packets in the image data
           section.

           This keyword is optional, but recommended, for runlength-encoded
           image compression.  It is required for arithimetic encoded image
           compression.  A detailed explanation of image compression follows
           this list.

      rows=value
           is a required keyword and specifies the number of rows, or height in
           pixels, of the image.

      scene=value
           is an optional keyword and is a reference number for sequencing of
           images.

           This keyword is typically useful for animating a sequence of images.

      Comments can be included in the keyword section.  Comments must begin
      with a { character and end with a } character.

      An example keyword section follows:

          {
            Rendered via Dore by Sandy Hause.
          }
          id=ImageMagick
          class=PseudoClass  colors=256
          compression=RunlengthEncoded  packets=27601
          columns=1280  rows=1024
          scene=1
          ^L
          :

      The binary image data that follows the keyword text is stored in one of
      two binary classes as specified by the class keyword: DirectClass or
      PseudoClass.





10/89                                                                   Page 15







DISPLAY(1)                 X Version 11(1 July 1991)                 DISPLAY(1)


      Use the DirectClass class to store continuous-tone images.  DirectClass
      requires that the image pixels immediately follow the keyword text and be
      stored as binary red, green, and blue intensity values.  The total number
      of pixels expected is equal to the number of pixel columns times the
      number of pixel rows as specified by the columns and rows keywords.

      If the compression keyword is not specified, a red, green, and blue byte
      in that order is expected for each pixel of the image.

      If compression is QEncoded, each red, green, and blue byte intensity
      value is encoded using the predictive arithmetic compression algorithm.
      Use the packets keyword to specify the total number of arithimetic
      encoded packets that comprise the image.  Refer to "JPEG-9-R6 Working
      Draft for Development of JPEG CD", January 1991, for implementation
      specific details.

      If compression is RunlengthEncoded, each red, green, and blue byte
      intensity value is followed by a count byte. This value specifies the
      number of horizonally contiguous pixels in the image of that color.  The
      count (0-255) is one less than the actual number of contiguous pixels;
      thus a single packet can represent from 1 up to 256 identical pixels.
      The total number of pixels specified by the individual count bytes must
      add up to the number of pixel columns times the number of pixel rows as
      specified by the columns and rows keywords.  Use packets to specify the
      total number of runlength-encoded packets that comprise the image.

      Use the PseudoClass class to store pseudo-color images.  PseudoClass
      requires that the image colormap and pseudo-color pixels immediately
      follow the keyword text.  The colormap is stored as contiguous red,
      green, and blue intensity values.  The number of intensity values
      expected is determined by the colors keyword.  Note, an image colormap is
      restricted to at most 65535 entries.  The binary pseudo-color image is
      stored as indexes into the colormap.  If the colormap size exceeds 256
      entries, then each colormap index is two bytes each with the most-
      significant-byte first.  The total number of pixels expected is equal to
      the number of pixel columns times the number of pixel rows as specified
      by the columns and rows keywords.

      If the compression keyword is not specified, a colormap index is expected
      for each pixel of the image.

      If compression is QEncoded, each colormap index is encoded using the
      predictive arithmetic compression algorithm.  Use the packets keyword to
      specify the total number of arithimetic encoded packets comprise the
      image.  Refer to "JPEG-9-R6 Working Draft for Development of JPEG CD",
      January 1991, for implementation specific details.

      If compression is RunlengthEncoded, each colormap index is followed by a
      count byte. This value  specifies the number of horizonally contiguous
      pixels in the image of that color.  The count (0-255) is one less than
      the actual number of contiguous pixels; thus a single packet can
      represent from 1 up to 256 identical pixels.  The total number of pixels


Page 16                                                                   10/89







DISPLAY(1)                 X Version 11(1 July 1991)                 DISPLAY(1)


      specified by the individual count bytes must add up to the number of
      pixels expected in the image as specified by the columns and rows
      keywords.  Use packets to specify the total number of runlength-encoded
      packets that comprise the image.

FEATURES
      Although Display will display an image on a server with an immutable
      colormap, the image quality may suffer as compared to a server with a
      read/write colormap.

      Display memory requirements is proportionate to the area of the image.

      Display does not complain when it encounters a keyword in an image file
      it does not understand.

ENVIRONMENT
      DISPLAY
           To get the default host, display number, and screen.

SEE ALSO
      X(1), xcmap(1), import(1), XtoPS(1), more(1), compress(1)

COPYRIGHT
      Copyright 1991 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.

ACKNOWLEDGEMENTS
      The MIT X Consortium for making network transparent graphics a reality.

      Michael Halle, Spatial Imaging Group at MIT, for the initial
      implementation of Alan Paeth's image rotation algorithm.





10/89                                                                   Page 17







DISPLAY(1)                 X Version 11(1 July 1991)                 DISPLAY(1)


      David Pensak, E. I. du Pont de Nemours & Company, for providing a
      computing environment that made this program possible.

      Paul Raveling, USC Information Sciences Institute, for the original idea
      of using space subdivision for the color reduction algorithm.  With
      Paul's permission, the COLOR REDUCTION ALGORITHM section is a adaptation
      from a document he wrote.

AUTHORS
      John Cristy, E.I. du Pont de Nemours & Company Incorporated












































Page 18                                                                   10/89





Typewritten Software • bear@typewritten.org • Edmonds, WA 98026