gm animate

NAME

| animate - animate a sequence of images

Contents

Synopsis
Description
Examples
Options
Mouse Buttons
Command Widget
Keyboard Accelerators
X Resources
Environment
Configuration Files
Copyright
Acknowledgement
Authors

Synopsis

| animate [ options ...] file [ [ options ...] file ...]

Description

Animate displays a sequence of images on any workstation display running an X server. animate first determines the hardware capabilities of the workstation. If the number of unique colors in an 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-per-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 sequence can display on a continuous-tone 24 bits-per-pixel device.

To help prevent color flashing on X server 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 to a single colormap. See mogrify(1) for details. Alternatively, you can use a Standard Colormap; or a static, direct, or true color visual. You can define a Standard Colormap with xstdcmap. See xstdcmap(1) for details. This method is recommended for colormapped X server because it eliminates the need to compute a global colormap.

Back to Contents

Examples

To animate a set of images of a cockatoo, use:

        gm animate cockatoo.*

To animate a cockatoo image sequence while using the Standard Colormap best, use:

        xstdcmap -best
        gm animate -map best cockatoo.*

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

        gm animate +borderwidth -backdrop cockatoo.*

Back to Contents

Options

For a more detailed description of each option, see Options, above. GraphicsMagick(1).

| -authenticate <string>

| decrypt image with this password

| -backdrop

| display the image centered on a backdrop.

| -background <color>

| the background color

| -bordercolor <color>

| the border color

| -borderwidth <geometry>

| the border width

| -chop <width>x<height>{+-}<x>{+-}<y>{%}

| remove pixels from the interior of an image

| -colormap <type>

| define the colormap type

| -colors <value>

| preferred number of colors in the image

| -colorspace <value>

| the type of colorspace

| -crop <width>x<height>{+-}<x>{+-}<y>{%}

| preferred size and location of the cropped image

| -debug <events>

| enable debug printout

| -define <key>{=<value>},...

| add coder/decoder specific options

| -delay <1/100ths of a second>

| display the next image after pausing

| -density <width>x<height>

| horizontal and vertical resolution in pixels of the image

| -depth <value>

| depth of the image

| -display <host:display[.screen]>

| specifies the X server to contact

| -dispose <method>

| GIF disposal method

| -dither

| apply Floyd/Steinberg error diffusion to the image

| -font <name>

| use this font when annotating the image with text

| -foreground <color>

| define the foreground color

| -gamma <value>

| level of gamma correction

| -geometry <width>x<height>{+-}<x>{+-}<y>{%}{@}{!}{^}{<}{>}

| preferred size and location of the Image window.

| -help

| print usage instructions

| -iconGeometry <geometry>

| specify the icon geometry

| -iconic

| iconic animation

| -interlace <type>

| the type of interlacing scheme

| -limit <type> <value>

| Disk, File, Map, Memory, or Pixels resource limit

| -log <string>

| Specify format for debug log

| -map <type>

| display image using this type.

| -matte

| store matte channel if the image has one

| -mattecolor <color>

| specify the color to be used with the -frame option

| -monitor

| show progress indication

| -monochrome

| transform the image to black and white

| -name

| name an image

| -noop

| NOOP (no option)

| -pause <seconds>

| pause between animation loops [animate]

| -remote

| perform a X11 remote operation

| -rotate <degrees>{<}{>}

| rotate the image

| -sampling-factor <horizontal_factor>x<vertical_factor>

| chroma subsampling factors

| -scenes <value-value>

| range of image scene numbers to read

| -shared-memory

| use shared memory

| -size <width>x<height>{+offset}

| width and height of the image

| -text-font <name>

| font for writing fixed-width text

| -title <string>

| assign title to displayed image [animate, display, montage]

| -treedepth <value>

| tree depth for the color reduction algorithm

| -trim

| trim an image

| -type <type>

| the image type

| -verbose

| print detailed information about the image

| -version

| print GraphicsMagick version string

| -visual <type>

| animate images using this X visual type

| -window <id>

| make image the background of a window

For a more detailed description of each option, see Options, above. GraphicsMagick(1).

Any option you specify on the command line remains in effect for the group of images following it, until the group is terminated by the appearance of any option or -noop. For example, to animate three images, the first with 32 colors, the second with an unlimited number of colors, and the third with only 16 colors, use:

         gm animate -colors 32 cockatoo.1 -noop cockatoo.2 -colors 16 cockatoo.3

Animate options can appear on the command line or in your X resources file. See X(1). Options on the command line supersede values specified in your X resources file.

Image filenames may appear in any order on the command line if the image format is MIFF (refer to miff(5) and the scene keyword is specified in the image. Otherwise the images will display in the order they appear on the command line.

Back to Contents

Mouse Buttons

| Press any button to map or unmap the Command widget. See the next section for more information about the Command widget.

Back to Contents

Command Widget

The Command widget lists a number of sub-menus and commands. They are

- Animate
  - Open
  - Play
  - Step
  - Repeat
  - Auto Reverse
- Speed
  - Faster
  - Slower
- Direction
  - Forward
  - Reverse
- Image Info
- Help
- Quit

Menu items with a indented triangle have a sub-menu. They are represented above as the indented items. To access a sub-menu item, move the pointer to the appropriate menu and press a button and drag. When you find the desired sub-menu item, release the button and the command is executed. Move the pointer away from the sub-menu if you decide not to execute a particular command.

Back to Contents

Keyboard Accelerators

Ctl+O
  Press to load an image from a file.
space
  Press to display the next image in the sequence.
<
  Press to speed-up the display of the images. Refer to -delay for more information.
>
  Press to slow the display of the images. Refer to -delay for more information.
?
  Press to display information about the image. Press any key or button to erase the information.
  This information is printed: image name; image size; and the total number of unique colors in the image.
F1
  Press to display helpful information about animate(1).
Ctl-q
  Press to discard all images and exit program.

Back to Contents

X Resources

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

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

background (class Background)
  Specifies the preferred color to use for the Image window background. The default is #ccc.
borderColor (class BorderColor)
  Specifies the preferred color to use for the Image window border. The default is #ccc.
borderWidth (class BorderWidth)
  Specifies the width in pixels of the Image window border. The default is 2.
font (class Font or FontList)
  Specifies the name of the preferred font to use in normal formatted text. The default is 14 point Helvetica.
foreground (class Foreground)
  Specifies the preferred color to use for text within the Image window. The default is black.
geometry (class geometry)
  Specifies the preferred size and position of the image window. It is not necessarily obeyed by all window managers. Offsets, if present, are handled in X(1) style. A negative x offset is measured from the right edge of the screen to the right edge of the icon, and a negative y offset is measured from the bottom edge of the screen to the bottom edge of the icon.
iconGeometry (class IconGeometry)
  Specifies the preferred size and position of the application when iconified. It is not necessarily obeyed by all window managers. Offsets, if present, are handled in the same manner as in class Geometry.
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.
matteColor (class MatteColor)
  Specify the color of windows. It is used for the backgrounds of windows, menus, and notices. A 3D effect is achieved by using highlight and shadow colors derived from this color. Default value: #ddd.
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.
sharedMemory (class SharedMemory)
  This resource specifies whether animate should attempt use shared memory for pixmaps. ImageMagick must be compiled with shared memory support, and the display must support the MIT-SHM extension. Otherwise, this resource is ignored. The default is True.
text_font (class textFont)
  Specifies the name of the preferred font to use in fixed (typewriter style) formatted text. The default is 14 point Courier.
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.

Back to Contents

Environment

| COLUMNS

| Output screen width. Used when formatting text for the screen. Many Unix systems keep this shell variable up to date, but it may need to be explicitly exported in order for GraphicsMagick to see it.

| DISPLAY

| X11 display ID (host, display number, and screen in the form hostname:display.screen).

| HOME

| Location of user's home directory. GraphicsMagick searches for configuration files in $HOME/.magick if the directory exists. See MAGICK_CODER_MODULE_PATH, MAGICK_CONFIGURE_PATH, and MAGICK_FILTER_MODULE_PATH if more flexibility is needed.

| MAGICK_CODER_STABILITY

The minimum coder stability level before it will be used. The available levels are PRIMARY, STABLE, and UNSTABLE. The default minimum level is UNSTABLE, which means that all available coders will be used. The purpose of this option is to reduce the security exposure (or apparent complexity) due to the huge number of formats supported. Coders at the PRIMARY level are commonly used formats with very well maintained implementations. Coders at the STABLE level are reasonably well maintained but represent less used formats. Coders at the UNSTABLE level either have weak implementations, the file format itself is weak, or the probability the coder will be needed is vanishingly small.

| MAGICK_CODER_MODULE_PATH

Search path to use when searching for image format coder modules. This path allows the user to arbitrarily extend the image formats supported by GraphicsMagick by adding loadable modules to an arbitrary location rather than copying them into the GraphicsMagick installation directory. The formatting of the search path is similar to operating system search paths (i.e. colon delimited for Unix, and semi-colon delimited for Microsoft Windows). This user specified search path is used before trying the default search path.

| MAGICK_CONFIGURE_PATH

| Search path to use when searching for configuration (.mgk) files. The formatting of the search path is similar to operating system search paths (i.e. colon delimited for Unix, and semi-colon delimited for Microsoft Windows). This user specified search path is used before trying the default search path.

| MAGICK_DEBUG

| Debug options (see -debug for details)

| MAGICK_FILTER_MODULE_PATH

Search path to use when searching for filter process modules (invoked via -process). This path allows the user to arbitrarily extend GraphicsMagick's image processing functionality by adding loadable modules to an arbitrary location rather than copying them into the GraphicsMagick installation directory. The formatting of the search path is similar to operating system search paths (i.e. colon delimited for Unix, and semi-colon delimited for Microsoft Windows). This user specified search path is used before trying the default search path.

| MAGICK_HOME

| Path to top of GraphicsMagick installation directory. Only observed by "uninstalled" builds of GraphicsMagick which do not have their location hard-coded or set by an installer.

| MAGICK_MMAP_READ

If MAGICK_MMAP_READ is set to TRUE, GraphicsMagick will attempt to memory-map the input file for reading. This usually substantially improves read performance if the file has recently been read. However, testing shows that performance may be reduced for files accessed for the first time via a network since some operating systems failed to do read-ahead over network mounts for memory mapped files.

| MAGICK_MMAP_WRITE

| If MAGICK_MMAP_WRITE is set to TRUE, GraphicsMagick will attempt to memory-map the output file for writing. This is an experimental feature (which is currently broken). Write performance is usually somewhat worse when using this approach rather than the default one.

| MAGICK_IO_FSYNC

If MAGICK_IO_FSYNC is set to TRUE, then GraphicsMagick will request that the output file is fully flushed and synchronized to disk when it is closed. This incurs a performance penalty, but has the benefit that if the power fails or the system crashes, the file should be valid on disk. If image files are referenced from a database, then this option helps assure that the files referenced by the database are valid.

| MAGICK_IOBUF_SIZE

The amount of I/O buffering (in bytes) to use when reading and writing encoded files. The default is 16384, which is observed to work well for many cases. The best value for a local filesystem is usually the the native filesystem block size (e.g. 4096, 8192, or even 131,072 for ZFS) in order to minimize the number of physical disk I/O operations. I/O performance to files accessed over a network may benefit significantly by tuning this option. Larger values are not necessarily better (they may be slower!), and there is rarely any benefit from using values larger than 32768. Use convert's -verbose option in order to evaluate read and write rates in pixels per second while keeping in mind that the operating system will try to cache files in RAM.

| MAGICK_LIMIT_DISK

| Maximum amount of disk space allowed for use by the pixel cache.

| MAGICK_LIMIT_FILES

| Maximum number of open files.

| MAGICK_LIMIT_MAP

| Maximum size of a memory map.

| MAGICK_LIMIT_MEMORY

| Maximum amount of memory to allocate from the heap.

| MAGICK_TMPDIR

| Path to directory where GraphicsMagick should write temporary files. The default is to use the system default, or the location set by TMPDIR.

| TMPDIR

| For POSIX-compatible systems (Unix-compatible), the path to the directory where all applications should write temporary files. Overridden by MAGICK_TMPDIR if it is set.

| TMP or TEMP

| For Microsoft Windows, the path to the directory where applications should write temporary files. Overridden by MAGICK_TMPDIR if it is set.

| OMP_NUM_THREADS

| As per the OpenMP standard, this specifies the number of threads to use in parallel regions. Some compilers default the number of threads to use to the number of processor cores available while others default to just one thread. See the OpenMP specification for other standard adjustments and your compiler's manual for vendor-specific settings.

Back to Contents

Configuration Files

GraphicsMagick uses a number of XML format configuration files:

| colors.mgk

| colors configuration file

      <?xml version="1.0"?>
      <colormap>
        <color name="AliceBlue" red="240" green="248" blue="255"
               compliance="SVG, X11, XPM" />
      </colormap>

| delegates.mgk

| delegates configuration file

| log.mgk

| logging configuration file

      <?xml version="1.0"?>
      <magicklog>
        <log events="None" />
        <log output="stdout" />
        <log filename="Magick-%d.log" />
        <log generations="3" />
        <log limit="2000" />
        <log format="%t %r %u %p %m/%f/%l/%d:\n  %e"  />
      </magicklog>

| magic.mgk

| file header magic test configuration file

      <?xml version="1.0"?>
      <magicmap>
        <magic name="AVI" offset="0" target="RIFF" />
      </magicmap>

| modules.mgk

| loadable modules configuration file

      <?xml version="1.0"?>
      <modulemap>
        <module magick="8BIM" name="META" />
      </modulemap>

| type.mgk

| master type (fonts) configuration file

      <?xml version="1.0"?>
      <typemap>
        <include file="type-windows.mgk" />
        <type
          name="AvantGarde-Book"
          fullname="AvantGarde Book"
          family="AvantGarde"
          foundry="URW"
          weight="400"
          style="normal"
          stretch="normal"
          format="type1"
          metrics="/usr/local/share/ghostscript/fonts/a010013l.afm"
          glyphs="/usr/local/share/ghostscript/fonts/a010013l.pfb"
        />
      </typemap>

Back to Contents

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.
  David Pensak, duPont, for providing a computing environment that made this program possible.
  Paul Raveling, USC Information Sciences Institute. The spatial subdivision color reduction algorithm is based on his Img software.

Back to Contents

Authors

| John Cristy, Bob Friesenhahn, Glenn Randers-Pehrson, William Radcliff, Leonard Rosenthol.

Back to Contents

Copyright

Copyright (C) 2002 - 2009 GraphicsMagick Group, an organization dedicated to making software imaging solutions freely available.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files ("GraphicsMagick"), to deal in GraphicsMagick without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of GraphicsMagick, and to permit persons to whom GraphicsMagick is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of GraphicsMagick.

The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall GraphicsMagick Group be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with GraphicsMagick or the use or other dealings in GraphicsMagick.

Except as contained in this notice, the name of the GraphicsMagick Group shall not be used in advertising or otherwise to promote the sale, use or other dealings in GraphicsMagick without prior written authorization from the GraphicsMagick Group.

Additional copyrights and licenses apply to this software. You should have received a copy of Copyright.txt with this package, which describes additional copyrights and licenses which apply to this software; otherwise see http://www.graphicsmagick.org/www/Copyright.html.

Back to Contents

[Home] [Utilities Index]

Copyright © GraphicsMagick Group 2002 - 2008