home *** CD-ROM | disk | FTP | other *** search
/ YPA: Your Privacy Assured / YPA.ISO / other_goodies / utilities / xanim5.lha / xanim26976 / xanim.readme < prev    next >
Text File  |  1995-02-11  |  35KB  |  887 lines

  1.  
  2. XAnim Rev 2.69.7.6  31Jan95
  3.  
  4. COMPILING ON UNIX Systems (SunOS,Solaris,HP/UX,DG/UX,AIX,
  5.                Linux,Ultrix,OSF/1,etc)
  6.  
  7.  
  8.   If you have Imake on your system you can type
  9.  
  10.     xmkmf
  11.  
  12.   which should produce a Makefile from the Imakefile. Then
  13.   you can type:
  14.  
  15.     make xanim
  16.   
  17.   If this doesn't work you can copy Makefile.unx to Makefile.
  18.   Edit the Makefile and specify where the X11 includes and 
  19.   X11 libraries are on your particular machine. Then type
  20.  
  21.     make xanim
  22.  
  23.   NOTE: That in the Imakefile, XCOMM is used as a comment. This
  24.   is recommended by X11R6, but may break older revs. To fix,
  25.   simply replace every occurence of "XCOMM" with "#" in the
  26.   Imakefile. See top of Imakefile for more details.
  27.  
  28.  
  29. COMPILING ON VMS/AXP Systems
  30.   The files make.com and xanimXX.opt are provided for VMS users.
  31.   make.com should correctly detect wether you're running
  32.   DECWindows XUI or DECWindows MOTIF(revs 1.1 and 1.2) and use
  33.   the appropriate xanimXX.opt file.
  34.  
  35.   If you use the VMS MMS (or "make") facility, then a descript.mms
  36.   file is provided.
  37.  
  38.   NOTE: since VMS is case insensitve, all options to xanim must be
  39.   enclosed in double quotes in order for them to be proper recognized.
  40.   Example:
  41.         xanim "+bCn" anim1 anim2
  42.  
  43.  
  44. HOW TO USE XANIM
  45. The following is a copy of the man page with examples at the end.
  46.  
  47. SYNOPSIS
  48.      xanim [ +Vnum ] [ +Aaopts ]  [  +Ccopts  ]  [  +Ggopts  ]  [
  49.           +Mmopts  ] [ +Ssopts ] [ +opts ] animfile [ [ +opts ] [
  50.           animfile ] ... ]
  51.  
  52. DESCRIPTION
  53.      XAnim is a program that can display  animations  of  various
  54.      formats on systems running X11. XAnim currently supports the
  55.      following animation types:
  56.  
  57.       +  FLI animations.
  58.       +  FLC animations.
  59.       +  IFF animations.  The  following  features  are  sup-
  60.          ported:
  61.            -> Compressions 3,5,7,J(movies) and l(small L).
  62.            -> Color cycling during single images and anims.
  63.            -> Display Modes: depth 1-8, EHB, HAM and HAM8.
  64.       +  GIF87a and GIF89a files.
  65.            -> single and multiple images supported.
  66.            -> GIF89a animation extensions supported.
  67.       +  GIF89a animation extension support.
  68.       +  a kludgy text file listing gifs and  what  order  to
  69.          show them in.
  70.       +  DL animations. Formats 1, 2 and 3. TEMPORARILY DISABLED.
  71.       +  Amiga PFX(PageFlipper Plus F/X) animations. DISABLED TEMPORARILY.
  72.       +  Amiga MovieSetter animations(For those Eric Schwartz
  73.          fans).
  74.       +  Utah Raster Toolkit RLE images and anims.
  75.       +  AVI animations. Currently supported are
  76.            ->*IBM Ultimotion     (ULTI) depth 16.
  77.                -> JPEG               (JPEG) depth 24.
  78.                -> Motion JPEG        (MJPG) depth 24.
  79.                -> Intergraph JPEG    (IJPG) depth 24.
  80.            -> Microsoft Video 1  (CRAM) depth 8 and 16.
  81.            -> SuperMac Cinepak   (CVID) depth 24.
  82.            -> Uncompressed       (RGB ) depth 8
  83.            -> Run length encoded (RLE8) depth 8.
  84.       +  Quicktime Animations.  The  following  features  are
  85.          supported:
  86.            -> Uncompressed     (RAW ) depth 4,8,16,24,24+ and GRAY 4,8.
  87.            -> Apple Graphics   (RLE ) depth 1,8,16 and 24 and GRAY 8.
  88.            -> Apple Animation  (SMC ) depth 8 and GRAY.
  89.            -> Apple Video      (RPZA) depth 16.
  90.            -> SuperMac Cinepak (CVID) depth 24 and GRAY 8.
  91.            -> ???      YUV2    (YUV2) depth 24.
  92.            -> Photo JPEG       (JPEG) depth 8 and 24.
  93.            -> Supports multiple video trak's.
  94.            -> Supports animations with multiple codecs.
  95.            -> Supports single-fork and separate .rsrc and .data forks.
  96.       +  JFIF images. NOTE: use XV for single images. This is more
  97.          for animation of a sequence of JPEG images.
  98.           +  MPEG animations. Currently only Type  I  Frames  are
  99.              displayed.  Type  B  and Type P frames are currently
  100.              ignored, but will be added in future revs.
  101.       +  WAV audio files may have their sound added to any animation
  102.          type that doesn't already have audio, by specifying the .wav
  103.          file after the animation file on the command line. Currently
  104.          only the PCM audio codec is supported.
  105.       +  any combination of the above  on  the  same  command
  106.          line.
  107.  
  108. ---------------------------------------------------------------------------
  109. * The following copyright applies to all Ultimotion segments of the code:
  110.  
  111.   "Copyright International Business Machines Corporation 1994, All rights
  112.    reserved. This product uses Ultimotion(tm) IBM video technology."
  113. ---------------------------------------------------------------------------
  114.  
  115.      XAnim also provides various options that allow the  user  to
  116.      alter colormaps, playback speeds, looping modes and can pro-
  117.      vide on-the-fly scaling of animations with the mouse.
  118.  
  119. OPTIONS
  120.      A + will generally turn an option on and a -  will  turn  an
  121.      option  off.   This  can  be  reversed at compile time. (see
  122.      xanim_config.h).
  123.  
  124.      In each SubMenu, the options can be  run  together  with  no
  125.      intervening spaces. In the list of SubMenu options presented
  126.      below, the first letter given is the letter  that  specifies
  127.      the  SubMenu  and  should NOT be repeated if several SubMenu
  128.      options are to be run together.
  129.  
  130.      For example,  "+Cn  +Cs10  +CF4"  can  also  be  written  as
  131.      "+Cns10F4" or "+CF4s10n".
  132.  
  133.      A + or a - within a SubMenu will be an exit from  that  sub-
  134.      menu.   Options  will  affect  all  animations following the
  135.      invocation of that option. Some options may  be  changed  in
  136.      between animations without affecting previous animations.
  137.  
  138.      In the following sections,  an  "num"  represents  an  integer
  139.      number and an "fnum" represents a floating point number. Don't
  140.      include the double quotes. If a floating point number is of an 
  141.      integer amount, the "." need not be specified. There should be
  142.      no spaces between the option and the numbers.
  143.  
  144.      aopts SubMenu for Audio Options
  145.  
  146.       +Ae        Audio Enable. XAnim will ignore audio data if
  147.             this option is not used.
  148.  
  149.       +Ak        This option allows XAnim to skip video frames
  150.             in order to help keep video in sync with audio.
  151.             default is on.
  152.  
  153.       +As"fnum"    Scale Audio playback speed by "fnum". Only the
  154.             range 0.125 to 8.00 is allowed.
  155.             NOTE: CURRENTLY VIDEO DOESN'T SCALE WITH AUDIO.
  156.  
  157.       +Ap"num"    This turns a hardware specific Audio port on or off.
  158.                Port 0 - main speaker (on  by default)
  159.                Port 1 - headphones   (off by default)
  160.                Port 2 - line out     (off by default)
  161.  
  162.       +Av"num"    Sets the inital Audio Volume(0-100) with 0
  163.             the lowest. default is 40.
  164.  
  165.      copts SubMenu for Color Options
  166.  
  167.       +C1        Create a colormap from the  first  frame  of  a
  168.             TrueColor  anim  and  then  remap the remaining
  169.             frames to this colormap. This  can  potentially
  170.             add  significant time to the startup of an ani-
  171.             mation but usually results  in  better  colors.
  172.             The  animation  needs  to  be buffered for this
  173.             option to work.  Not  valid  for  TrueColor  or
  174.             DirectColor displays(nor is it needed).
  175.  
  176.       +C3        Convert TrueColor  anims  to  332(StaticColor).
  177.             TrueColor  anims  are  animations  that provide
  178.             separate RGB info for each pixel,  rather  than
  179.             each  pixel being an index into a global color-
  180.             map. AVI(16bit CRAM), QT(RPZA and RLE depth  16
  181.             and  24)  and URT RLE 24 bit anims are examples
  182.             of TrueColor anims. This option is ignored  for
  183.             TrueColor or DirectColor displays.
  184.  
  185.       +CA         Create  a  colormap  from  each  frame   of   a
  186.             TrueColor  anim.  This  can  be  useful  if the
  187.             colors radically change during  the  course  of
  188.             the  animation.  This can take a VERY,VERY long
  189.             time at start up. Animation must  be  buffered.
  190.             This   option   is  ignored  for  TrueColor  or
  191.             DirectColor displays.
  192.  
  193.       +Ca         Remap all images to  single  new  cmap  created
  194.             from all of the colormaps.
  195.  
  196.       +Cd         Use Floyd-Steinberg  dithering  if  needed  for
  197.             non-monochrome  displays.   This  will  cause a
  198.             reduction in playback speed.
  199.  
  200.       +Cf         Forcibly remap to all  frames  to  1st  frame's
  201.             cmap.
  202.  
  203.       +CF0          Turns off CF4 option.
  204.  
  205.       +CF4          This option samples the colors of true color
  206.             animations ahead of time and forms a color
  207.             lookup table.  Beats the just truncating to a
  208.             RGB 332 color table and IMHO beats dithering.
  209.             See the +s option below(also in copts submenu).
  210.             Currently ONLY Work with unbuffered animations
  211.  
  212.       +Cg         Convert TrueColor anims  to  gray  scale.  This
  213.             option is ignored for TrueColor and DirectColor
  214.             displays.
  215.  
  216.       +Ch         Use histogram to aid in color  reduction.  His-
  217.             trogramming  is  only  done  on frames that are
  218.             buffered.
  219.  
  220.       +Cm         This option is currently needed if you want  to
  221.             dither  TrueColor anims to a 332 colormap. Ani-
  222.             mation must be buffered.  Typically  +bC3dm  is
  223.             the  option  to  use. This can take a VERY long
  224.             time at start up.
  225.  
  226.       +Cn         Don't create new colormap but instead  allocate
  227.             colors from the X11 Display's default cmap.
  228.  
  229.       +Cs"num"    This is the number of frames the +CF4 option looks
  230.             at ahead of time. More frames potentially yields
  231.             better colors results, but takes more time at
  232.             start up.  default is 5.
  233.  
  234.      gopts SubMenu for Gamma Options
  235.  
  236.       +Ga"fnum"    Set gamma of animation to be displayed.
  237.  
  238.       +Gd"fnum"    Set gamma of display. 1.0 is no change. gamma's
  239.             greater  than 1.0 typically brighten the anima-
  240.             tion.
  241.  
  242.      mopts SubMenu for Median-Cut Quantization Options
  243.  
  244.       +Ma        compute box color from average of box.
  245.  
  246.       +Mc        compute box color as center of box.
  247.  
  248.       +Mb"num"    Truncate rgb to "num" bits before quantizing.
  249.  
  250.      sopts SubMenu for Scaling Options
  251.  
  252.       +Si        Half the  height  of  IFF  anims  if  they  are
  253.             interlaced.(Not  completely  reliable since not
  254.             all IFF anims correctly identify themselves  as
  255.             interlaced).
  256.  
  257.       +Sn        Prevents X11  window  from  resizing  to  match
  258.             animations's size.
  259.  
  260.       +Sr        Allow user to  resize  animation  on  the  fly.
  261.             Enlarging an animation can greatly reduce play-
  262.             back speed depending on the power of the cpu.
  263.  
  264.       +Ss"fnum"    Scale the size  of  animation  by  "fnum"  before
  265.             displaying.
  266.  
  267.       +Sh"fnum"    Scale the horizontal size of the  animation  by
  268.             "fnum" before displaying.
  269.  
  270.       +Sv"fnum"    Scale the vertical size  of  the  animation  by
  271.             "fnum" before displaying.
  272.  
  273.       +Sx"num"    Scale the animation to have  width  "num"  before
  274.             displaying.
  275.  
  276.       +Sy"num"    Scale the animation to have height  "num"  before
  277.             displaying.
  278.  
  279.       +Sc        Copy display scaling factors to display buffer-
  280.             ing factors.
  281.  
  282.       +SS"fnum"    Scale the size of the animation by "fnum"  before
  283.             buffering it.
  284.  
  285.       +SH"fnum"    Scale the horizontal size of the  animation  by
  286.             "fnum" before buffering it.
  287.  
  288.       +SV"fnum"    Scale the vertical size  of  the  animation  by
  289.             "fnum" before buffering it.
  290.  
  291.       +SX"num"    Scale the animation to have  width  "num"  before
  292.             buffering it.
  293.  
  294.       +SY"num"    Scale the animation to have height  "num"  before
  295.             buffering it.
  296.  
  297.       +SC        Copy buffer scaling factors to display  scaling
  298.             factors.
  299.  
  300.      zopts SubMenu for Special Options
  301.  
  302.  
  303.       +Ze        XAnim will exit after playing  through  command
  304.             line once.
  305.  
  306.       +Zp"num"    XAnim pause at frame "num" and then wait for user
  307.             input.  Several  pauses  may be specified. Each
  308.             group of pauses will only affect the  animation
  309.             immediately following them on the command line.
  310.             Pauses will occur at least once.
  311.  
  312.       +Zr        This option enables the Remote Control  Window.
  313.             This  overrides  the  default  condition set in
  314.             xanim_config.h. Remote Control support must  be
  315.             compiled into XAnim for this to work.
  316.  
  317.  
  318.      Normal Options
  319.  
  320.       +b        Uncompress and buffer images before displaying.
  321.             This only applies to AVI,QT, IFF,FLI,FLC anima-
  322.             tions. The rest(GIF87a,GIF89a,DL,PFX  and  RLE)
  323.             are currently always uncompressed and buffered.
  324.             This is cleared by the +f option.
  325.  
  326.       +B        Used X11 Shared Memory(if present)for unbuffered
  327.             animations only.(This is mutually exclusive with
  328.             +b above).
  329.  
  330.       +f        Don't load anim into memory, but read each sec-
  331.             tion  only  when needed. This is supported only
  332.             for AVI,QT,IFF,FLI  and  FLC  animations.  This
  333.             option  is cleared by the +b option. This saves
  334.             memory at the cost of speed.
  335.  
  336.       +c        let xanim know that iff anim  is  a  nonlooping
  337.             one.
  338.  
  339.       +d"num"    debug switch. "num" can be from 0(off) to 5(most)
  340.             for level of detail.
  341.  
  342.       +F        Floyd-Steinberg dithering when needed.
  343.  
  344.       +j"num"    "num"  is  the  number  of  milliseconds  between
  345.             frames.  if  0  then  the time specified in the
  346.             animation is used for timing purposes.
  347.  
  348.       +l"num"    loop animation "num" number of times before  mov-
  349.             ing on to next animation.
  350.  
  351.       +lp"num"    ping-pong animation "num" number of times  before
  352.             moving on to next animation.
  353.  
  354.       +N        don't display images. Useful for benchmarking.
  355.  
  356.       +o        turns    on    certain    optimizations.    See
  357.             xanim.readme.
  358.  
  359.       +p        Use Pixmap instead of Image in X11. This option
  360.             has    no    effect   if   the   animation   is
  361.             buffered(either  by  default  or  with  the  +b
  362.             option).
  363.  
  364.       +r        Allow color cycling for IFF single images.
  365.  
  366.       +R        Allow color cycling  for  IFF  anims.  (default
  367.             should be off)
  368.  
  369.       +T0        Title option 0. Title is just XAnim.
  370.  
  371.       +T1        Title option 1. Title  is  current  anim  name.
  372.             When  anim is stopped, the current frame number
  373.             is included.
  374.  
  375.       +T2        Title option 2. Title is current anim name  and
  376.             current frame number.
  377.  
  378.       +v        Verbose mode. Gives some information about ani-
  379.             mation such as size, number of frames, etc.
  380.  
  381.       +V"num"    Select X11 Visual to use when displaying anima-
  382.             tion.  The  "num"  is  obtained  by  using the +X
  383.             option of xanim.
  384.  
  385.       +Vclass    Select the best X11 Visual of Class class  when
  386.             displaying  the  animation. class can be anyone
  387.             of the following strings and is  case  insensi-
  388.             tive. (ie StaTicGraY is same as staticgray).
  389.  
  390.             staticgray    Select best StaticGray Visual.
  391.             grayscale     Select best GrayScale Visual.
  392.             staticcolor   Select best StaticColor Visual.
  393.             pseudocolor   Select best PseudoColor Visual.
  394.             truecolor     Select best TrueColor Visual.
  395.             directcolor   Select best DirectColor Visual.
  396.  
  397.       +X        X11 verbose mode. Display information about the
  398.             support X11 visuals.
  399.  
  400.  
  401.  
  402.  
  403. WINDOW COMMANDS
  404.      Once the animation is up and running there are various  com-
  405.      mands  that  can  be entered into that animation window from
  406.      the keyboard.
  407.  
  408.      q         quit.
  409.  
  410.      Q         Quit.
  411.  
  412.      g         Stop color cycling.
  413.  
  414.      r         Restore original Colors(useful after g).
  415.  
  416.      w         Restore original window size(useful after resizing).
  417.  
  418.      z         This pops up or removes the Remote Control Window.
  419.                Remote Control support must be compiled into XAnim
  420.                for this to work.
  421.  
  422.      <space>   Toggle. starts/stops animation.
  423.  
  424.      ,         Single step back one frame.
  425.  
  426.      .         Single step forward one frame.
  427.  
  428.      <         Go back to start of previous anim.
  429.  
  430.      >         Go forward to start of next anim.
  431.  
  432.      m         Single step back one frame staying within anim.
  433.  
  434.      /         Single step forward one frame staying within anim.
  435.  
  436.      -         Increase animation playback speed.
  437.  
  438.      =         Decrease animation playback speed.
  439.  
  440.      0         Reset animation playback speed to original values.
  441.  
  442.      AUDIO RELATED WINDOW COMMANDS
  443.  
  444.      1           Decrement volume by 10.
  445.  
  446.      2           Decrement volume by 1.
  447.  
  448.      3           Increment volume by 1.
  449.  
  450.      4           Increment volume by 10.
  451.  
  452.      s           Toggle. Audio Volume(MUTE). on/off.
  453.  
  454.      8           Toggle. Main Speaker. on/off.
  455.  
  456.      9           Toggle. Headphones. on/off.
  457.  
  458.  
  459. MOUSE BUTTONS
  460.      Once the animation is up and running the mouse buttons  have
  461.      the following functions.
  462.  
  463.      <Left_Button>
  464.            Single step back one frame.
  465.  
  466.      <Middle_Button>
  467.            Toggle. starts/stops animation.
  468.  
  469.      <Right_Button>
  470.            Single step forward one frame.
  471.  
  472. BUFFERING, PIXMAPS and READ_FROM_FILE Options
  473.      XAnim by default will read the entire animation into memory.
  474.      DL,  PFX,  Moviesetter,  GIF  or URT RLE type animations are
  475.      always uncompressed  and  stored  in  memory  as  individual
  476.      images.
  477.  
  478.      For  the  AVI,  QT,  IFF,  FLI/FLC  animations,   only   the
  479.      compressed   delta   is   stored.   These  deltas  are  then
  480.      uncompressed each time they need to be displayed. The buffer
  481.      option(+b)  may  be used to potentially speed up playback by
  482.      uncompressing and storing these images ahead  of  time.  But
  483.      more memory is used up in the process.
  484.  
  485.      When an XPutImage is called, the image typically gets copied
  486.      twice,  once to memory and then from there onto the display.
  487.      A pixmap is directly copied onto  the  display  without  the
  488.      first  copy.  This is why it is sometimes much faster to use
  489.      the pixmap option(+p).  Each image isn't  converted  into  a
  490.      pixmap until the first time it is displayed. This is why the
  491.      first loop of an animation using this  option  is  sometimes
  492.      slower  than  subsequent  loops. While the pixmap option may
  493.      improve playback speed, it will slow things down if  on-the-
  494.      fly  scaling needs to be performed. This is because XAnim no
  495.      longer has direct access to the image and  needs  to  get  a
  496.      copy of it before it can be scaled.
  497.  
  498.      The read from file option(+f) causes xanim not to store  the
  499.      compressed  deltas in memory. Instead as each image is to be
  500.      displayed, xanim reads the  corresponding  compressed  delta
  501.      from  the  file, expands it and then displays it. While this
  502.      can dramatically cut down on  memory  usage,  the  necessary
  503.      reads  from  disk(or whatever) can slow down playback speed.
  504.      XAnim still needs to allocate one  to  three  image  buffers
  505.      depending  on  the type of animation and the scaling options
  506.      used. This option is only supported for AVI, QT, FLI/FLC and
  507.      IFF  animations.  The  BODY  chunk  of IFF animations is not
  508.      included in this. As a result, an IFF animation that is made
  509.      up  of  several  BODY chunks will not currently benefit from
  510.      this option.
  511.  
  512.  
  513. SCALING Options
  514.      There are two sets of scaling options. One set, the  display
  515.      scaling factors,  affects the size of the animation as it is
  516.      displayed. The other set, the buffer scaling factors, affect
  517.      the   size   of   the   images   as   they   are  stored  in
  518.      memory(buffered). The buffer  scaling  factors  only  affect
  519.      animations  that  are  buffered  and can greatly increase or
  520.      decrease memory usage.
  521.  
  522.      These two sets are completely independent of each other. You
  523.      can  set  the  buffer scaling factors to 20 times the normal
  524.      animation size and not affect the size at which that  anima-
  525.      tion  is  displayed.  The  images are stored at 20 times the
  526.      normal size(and at 400 times the memory usage), but then get
  527.      scaled  back  down  to  normal  size before being displayed.
  528.      NOTE: that an animation must be buffered in  order  for  the
  529.      buffer scaling factors to have any affect on it. The display
  530.      scaling factors affect all animations.
  531.  
  532.      You can create pixellation like  affects  by  buffering  the
  533.      animation  at  1/8 it's normal size, but keeping the display
  534.      scaling factors at the original size. (IE  "xanim  +bSS0.125
  535.      anim.anim").
  536.  
  537.      Many times it's faster to store  and  display  an  animation
  538.      with large dimensions at half-size. The option "+bSS0.5C" or
  539.      "+bSS0.5s0.5" both will accomplish this. To save memory, you
  540.      could  even store the animation at half size and yet display
  541.      it at full size. "+bSS0.5" will accomplish this.
  542.  
  543. FORWARDS, BACKWARDS and OPTIMIZATION.
  544.      Many type of animations(FLI/FLC/IFF/some AVI  and  QTs)  are
  545.      compressed  with  forward  playback in mind only. Each delta
  546.      only stores the difference between the current frame and the
  547.      previous frame. As a results, most of these animations don't
  548.      display correctly when played backwards.  Even when buffered
  549.      up, these may not work, since XAnim only stores the smallest
  550.      rectangle that encompasses the  changes  from  the  previous
  551.      frame.  You  can  force  XAnim  to store the entire frame by
  552.      specifying the "-o" option to turn  this  optimization  off.
  553.      This will most likely use more memory and slow down the ani-
  554.      mation, since more of the image needs to  be  stored  and/or
  555.      displayed.
  556.  
  557. COLOR OPTIONS
  558.      Most of this will be a TBD for a future rev and what's  here
  559.      might be sketchy, incomplete or just plain confusing.
  560.  
  561.      TrueColor and DirectColor displays don't need to worry about
  562.      most of these options, as the animations can be displayed in
  563.      their original colors(ignoring monitor variations etc). How-
  564.      ever,  TrueColor  and  DirectColor  displays  can't  display
  565.  
  566.      animations that employ color cycling  techniques  where  the
  567.      colormap  changes  from  frame  to frame.  DirectColor could
  568.      potentially support this, but not TrueColor.
  569.  
  570.      For the rest of the displays, the problem  becomes  matching
  571.      the  colors in the animations to the available colors of the
  572.      Display.  For  most  PseudoColor  displays  this  means  256
  573.      colors.  Many  of  which are already in use by various other
  574.      programs. XAnim defaults to creating it's own  colormap  and
  575.      using  all  the  colors  from  that. The window manager then
  576.      installs this new colormap, whenever the  mouse  pointer  is
  577.      inside  the  XAnim  animation  window(Sometimes  a  specific
  578.      action is required to change the ColorMap Focus, like click-
  579.      ing  in the window or pressing a specific key). In any case,
  580.      this action usually causes  all  the  other  colors  on  the
  581.      screen  to  be  temporarily  "messed-up"  until the mouse is
  582.      moved out of the animation window. The  alternative,  is  to
  583.      use  the  "+Cn"  option.  Now XAnim tries allocating all the
  584.      colors it needs from the current colormap. If it can't get a
  585.      certain color, then XAnim choose one that is "close" to this
  586.      certain color. Close is completely arbitrary. The  animation
  587.      is  now displayed in colors that are different than the ori-
  588.      ginal colors. This difference may or may not be noticeable.
  589.  
  590.      Another big problem is when the animations are what I called
  591.      TrueColor animations. Where each pixel is stored as RGB tri-
  592.      plets. For example, AVI 16 bit CRAM animations.  Each  pixel
  593.      has  5  bits of Red, 5 bits of Green and 5 bits of Blue info
  594.      associated with it. This means there  can  be  up  to  32768
  595.      unique  colors  in  each  image.  And  on  most  PseudoColor
  596.      displays we can only display 256 unique colors. Beside  get-
  597.      ting  better  displays,  what  can  we do? XAnim defaults to
  598.      truncating the RGB information from 555 to 332. That is to 3
  599.      bits  of  Red,  3  bits of Green and 2 bits of Blue. Less on
  600.      Blue because the human eye is  more  sensitive  to  Red  and
  601.      Green than Blue.  This 332 colormap happens to be 256 colors
  602.      in size, which nicely fits  in  with  our  display.  If  our
  603.      display  only  had  64 colors, then XAnim is smart enough to
  604.      truncate things down to 222. Now the problem is  the  colors
  605.      of the displayed anim are noticeably different than the ori-
  606.      ginal colors.  Typically you  can  see  color  banding  etc.
  607.      While  this  is fine to get a feel for the animation, we can
  608.      do better. One of the solutions XAnim  currently  offers  is
  609.      the "+bC1" option. What this does is choose the the best 256
  610.      colors from the first image  of  the  animation.  Then  each
  611.      pixel  of  each subsequent image is remapped to one of these
  612.      256 colors.  This takes up some CPU time up front  and  more
  613.      memory since each image needs to be buffered, but results in
  614.      a colors that are closer to the originals.  Another  option,
  615.      "+bCA",  chooses  the  best  256  from  each image, then 256
  616.      colors from all these colormaps  are  chosen  as  the  final
  617.      colormap.   This  is useful if the colors in the first image
  618.      aren't representative of the rest of the animation. This can
  619.      be  very  slow.  Another  option  that is supported, but not
  620.      really optimized for yet is "+bC3dm". This causes  XAnim  to
  621.      use  a  332 colormap and then apply a Floyd-Steinberg dither
  622.      algorithm to each image.  Currently this is very slow.  Dif-
  623.      ferent  dithers(like Ordered) and better optimizations might
  624.      speed this up  in  future  revs.  In  general,  handling  of
  625.      TrueColor animations in XAnim needs to be improved.
  626.  
  627.      Another scenario where colors need to be remapped,  is  when
  628.      several  images  or animations with different colormaps need
  629.      to be displayed.  Changing the colormap usually  results  in
  630.      an annoying flicker. One solution to this is to remap all of
  631.      the images/animations to the same colormap. The "+Ca" option
  632.      chooses  the  best  colors  from  all the colormaps and then
  633.      remaps all the images to it. The "+Cf" option, simply remaps
  634.      everything  to the first colormap.  The "+Ch" option is use-
  635.      ful when an animation's colormap specifies a lot  of  colors
  636.      that aren't used. XAnim looks through each buffered image of
  637.      the animation and makes a histogram of the  useage  of  each
  638.      color.  This  information  is then used to weedout unused or
  639.      rarely used colors.
  640.  
  641. QUICKTIME ANIMATIONS
  642.      Quicktime animations are  usually  stored  in  two  separate
  643.      files.  One is call a data fork and ends with a ".data". The
  644.      other is a resource fork and ends in  a  ".rsrc".  Sometimes
  645.      these  animations  are in a "flattened" format, where every-
  646.      thing is put into one file. There's no standard naming  for-
  647.      mat for these types of files.
  648.  
  649.      For example, if you have a quicktime animation  made  up  of
  650.      two  files  named:  "spin.rsrc"  and  "spin.data",   you can
  651.      display them using Xanim with either of the  following  com-
  652.      mands  "xanim  spin"  or  "xanim spin.rsrc".  XAnim is smart
  653.      enough to add/modfiy the  ".rsrc"  and  ".data"  endings  as
  654.      needed.
  655.  
  656.      If you use AUFS from the Columbia  Appletalk  Package,  then
  657.      Macintosh  files have their data fork stored in the expected
  658.      place, and the resource fork is in a file with the same name
  659.      in a  .resource subdirectory. Therefore, if the data fork is
  660.      in "spin", and the resource fork isin  ".resource/spin", the
  661.      movie can be displayed with "xanim spin".
  662.  
  663.      For "flattened" quicktime animations, you  need  to  specify
  664.      the entire file name.
  665.  
  666.      NOTE: XAnim may not support all SMC or RPZA quicktime anima-
  667.      tions. It'll print "unknown code variation XX" to the screen
  668.      as it encounters these and move on to the next image of that
  669.      animation.
  670.  
  671.  
  672. EXAMPLES:
  673.     To display a single animation with Audio:
  674.  
  675.         xanim +Ae car_race.avi
  676.  
  677.     To display a audio animation on Sparc. main speakers off
  678.     and  headphones on:
  679.  
  680.         xanim +Aep1 -Ap0 car_race.avi
  681.  
  682.     To display a single animation:
  683.  
  684.         xanim iff3.anim
  685.  
  686.     To display a nonlooping IFF animation:
  687.  
  688.         xanim +c iff3.anim
  689.  
  690.     To display A.fli 3 times, B.anim and C.movie 2 times each and D.fli
  691.     once before repeating:
  692.  
  693.         xanim -l3 A.fli -l2 B.anim C.movie -l1 D.fli
  694.  
  695.     To see A.anim real slow(2 seconds for each frame):
  696.  
  697.         xanim +j2000 A.anim
  698.  
  699.     To display title image for a while then run an animation at
  700.     normal speed:
  701.  
  702.         xanim +j2000 title.gif +j0 anim.gifanim
  703.  
  704.  
  705. A series of GIF's can be displayed as:
  706.  
  707.     xanim im_0.gif im_1.gif im_2.gif ... im_36.gif
  708.  
  709.  or
  710.  
  711.     xanim im_*.gif
  712.  
  713.  or
  714.  
  715.     xanim im.txt
  716.  
  717.  or
  718.  
  719.     xanim im.gifanim
  720.  
  721. where im.txt is a txt file(a list of images, see xanim.doc for more details).
  722. and im.gifanim is one gif file composed of im_0.gif through im_36.gif.
  723. (see txtmerge to create a single gif file from a txt file).
  724.  
  725. X11 Notes:
  726. --------------------------------------
  727.  I. X11 Server Options
  728.  
  729.    When XAnim opens the display it passes the argument list to X11 which
  730.    then filters off the arguments it recognizes. XAnim won't even see these
  731.    arguments(which is sometimes a problem). For instance
  732.  
  733.    xa -geom =+100+100 skier.fli
  734.  
  735.    will play the anim skier.fli at pos <100,100> on the X11 screen.  Or
  736.  
  737.    xa -display nantucket:0.0 skier.fli
  738.  
  739.    will display the anim skier.fli on the machine nantucket's display.
  740.  
  741.    Sometimes this is a problem, because a valid XAnim option is stripped by the
  742.    X11 server. For instance if +r was being stripped, then use ++r instead.
  743.    Same goes with -r. Use --r instead if you believe it's being filtered
  744.    by X11.
  745.  
  746. Machine Specific and Compiler Notes:
  747. --------------------------------------
  748.  Some PC's need you to uncomment the line below in Makefile.
  749.  #XA_INET_LIB = -linet
  750.  
  751.  Depending on your window manager(mwm,uwm,olwm,twm etc), you might
  752.  want to have XAnim do a XInstallColormap. This shouldn't be necessary
  753.  for most workstations and can cause core dumps on some PCs.
  754.  There are usually user selectable options for each window manager
  755.  that selects the colormap focus policy(pointer,fixed,explicit etc).
  756.  Use -DNO_INSTALL in Makefile if you DON't want XAnim to install
  757.  the colormap.
  758.  
  759.  Some X11's don't have support for multiple visuals.  An executable
  760.  compiled with such an X11 will not be able to correctly run on a
  761.  machine that does supports multiple visuals even if they're binary
  762.  compatible.
  763.  
  764.  Hugh D.R. Evans has supplied make.com, xanim.opt and added VMS defines
  765.  so that VMS users may compile and run XAnim. Rick Dyson has provided
  766.  the descript.mms file and some VMS fixes. John Kneitz has also
  767.  provide some VMS fixes and suggestions.
  768.  
  769. And Yet More Notes about Quicktime Animations
  770. ---------------------------------------------
  771.         NOTES ON QUICKTIME ANIMATIONS WITH XANIM
  772.  
  773.   (these are just my notes and may contain some inconsistencies.
  774.    There's currently some question about the true meaning of
  775.    "flatten". It might just mean taking a quicktime file and
  776.    replacing a references to another files with those files
  777.    themselves.  But lately many people use it to mean collapsing
  778.    the *.data and *.rsrc forks into one *.data fork for export
  779.    to a non-mac computer. - Mark)
  780.  
  781.  
  782.    EXTRACTING Quicktime Animations
  783.  
  784.     Typically you will obtain the quicktime animations that have
  785.     been archived and then binhex'd. If the file you have ends
  786.     in a .hqx, then you need to run hexbin on it ("hexbin anim.hqx").
  787.     This will create a *.bin file(not necessarily anim.bin, it
  788.     could be anything.bin. The actual name is contained within
  789.     the *.hqx file).  
  790.  
  791.     If the file you have ends in a .bin or you've just hexbin'd a file, 
  792.     now you need to unpack it. In other words extract the files that
  793.     are contained within it. These files can be programs/documents/
  794.     animations/images etc. They're not necessarily quicktime animations.
  795.  
  796.     There is a program called macunpack that should be used to
  797.     accomplish this. You need to use the -f option, I recommend
  798.     the -lv options as well. (ie "macunpack -flv file.bin")
  799.  
  800.     Macunpack doesn't support certain DiskDoubler or Stuffit Deluxe
  801.     archives. There is no unix/pc program that I know of that does(except 
  802.     for the Mac). In this case your only choice is to get a hold of a 
  803.     Macintosh computer and someone who knows how to use it and
  804.     hopefully some method of transferring files to/from it.
  805.  
  806.     Once you've unpacked everything, you should have three files,
  807.     a *.info, a *.rsrc and a *.data. You can delete the *.info file.
  808.     XAnim doesn't need or use it.
  809.  
  810.     The quicktime animation is made up of BOTH the *.rsrc and the
  811.     *.data files and therefore XAnim needs BOTH the *.rsrc and the 
  812.     *.data in order to recognize and display the animation.
  813.   
  814.     The only exception to this is if the animation has been "flattened".
  815.     Essentially, all that this means is that the .rsrc and .data files
  816.     were merged into one file for export to a non-mac computer.
  817.     This file doesn't have any real naming conventions, but it is
  818.     usually something like .mov, .mv, .qt, etc(it is never .bin or .hqx). 
  819.     And it is rarely .data. If XAnim can't play it, then it's 95%
  820.     likely to be a *.data fork(that's missing a *.rsrc fork) and not
  821.     a flattened quicktime animation.
  822.  
  823.     Macunpack and hexbin can be found in the macutil archive. They
  824.     are available at the following locations:
  825.  
  826.         sumex-aim.stanford.edu:/info-mac/unix/macutil-20b1.shar
  827.         ftp.cwi.nl:/pub/macutil2.0b3.shar.Z
  828.         solaris.ims.ac.jp:/pub/unix/mac/macutil-20b1.shar
  829.  
  830.     Use archie to find other sites.
  831.  
  832.     Here's a quick blurb on macutils from the readme.
  833.  
  834.             o hexbin - a program to convert BinHex 4.0 to MacBinary;
  835.           it also converts uuencode (and UULite) files to their
  836.           native binary format; support for .dl, .hex, and .hcx
  837.           formats (all predecessors of BinHex 4.0) also exists
  838.  
  839.             o macunpack - a program to unpack PackIt, StuffIt,
  840.           Diamond, Compactor/Compact Pro, most StuffIt Classic
  841.           and StuffIt Deluxe, DiskDoubler, Zoom and LHarc/MacLHa
  842.           archives.
  843.  
  844.           It also decodes BinHex 5.0, MacBinary, uuencode, and
  845.           UNIX compress (ie: .Z suffix) files (as well as variants
  846.           of compress implemented by various Macintosh compress
  847.           programs).
  848.  
  849.  
  850.   TRANSFERING DIRECTLY FROM A MACINTOSH
  851.  
  852.     If you are transferring a quicktime animation directly from a 
  853.     Macintosh(ftp/fetch/gator/etc), you need to use the MacBinary mode.
  854.     This will archive all three resource forks(.info,.rsrc and .data) 
  855.     into a .bin file and transfer that. You must then use "macunpack -flv"
  856.     as described above.
  857.   
  858.     If you use Binary mode(as opposed to the MacBinary mode), ONLY the 
  859.     *.data file will be transferred. This *.data file is useless without
  860.     the *.rsrc file, unless it happens to be "flattened". If you don't
  861.     absolutely know this to be true, then use the MacBinary mode and 
  862.     extract with macunpack.
  863.  
  864.  
  865.   OTHER PROGRAMS
  866.  
  867.     mcvert is also capable of extracting the *.rsrc and *.data files
  868.     form a MacBinary file(*.bin). It doesn't support all of the
  869.     archival compression formats that macunpack does and I'm not
  870.     as familiar with it. Archie should be able to find it.
  871.  
  872.   CREATING A QUICKTIME FOR EXPORT ON A MACINTOSH
  873.  
  874.     Movieconverter, part of Apple's Quicktime Starter Kit (a commercial product)
  875.     can do this.  Save the movie as BOTH "Make self-contained" and "Playable
  876.     on non-Apple computers." 
  877.  
  878.  
  879.   If you have any other questions or problems trying to run 
  880.   quicktime animation using xanim I might be able to answer
  881.   them.
  882.  
  883. ------------------------------------------------------------------------------
  884.  
  885. Mark Podlipec  podlipec@wellfleet.com
  886. http://www.portal.com/~podlipec/home.html  "The XAnim Home Page"
  887.