ANIM
ANIM is a file format, used to store digital movies and computer generated animations, and is a variation of the ILBM format, which is a subformat of Interchange File Format.
Main features
Anim file types
Known file types for Anim into AmigaOS are: Anim1, Anim2, Anim3, Anim5 and Anim7. Anim1 to Anim3 did not support audio. Anim 5 and Anim7 should be able to contain Audio Data, being a complete movie animation file format.Additions to IFF Standard
In addition to the normal ILBM chunks, ANIM file type also defines:- ANHD
- DLTA - stores changes between frames, with various compression methods supported to make use of the redundancy between frames.
- ANIM-0 ILBM BODY
- ANIM-1 ILBM XOR
- ANIM-2 Long Delta mode
- ANIM-3 Short Delta mode
- ANIM-4 General Delta mode
- ANIM-5 Byte Vertical Delta mode
- ANIM-6 Stereo Byte Delta mode
- ANIM-7 Anim-5 compression using LONG/WORD data
- ANIM-8 Anim-5 compression using LONG/WORD data
- ANIM-J Eric Grahams compression format
History
The ANIM IFF format was developed in 1988 by Gary Bonham at Sparta Inc., a firm based in California, originally for the production of animated video sequences on the Amiga computer, and was used for the first time in Aegis Development's Videoscape and Video Titler programs for the Amiga line of computers. Being very efficient and an official subset of existing Amiga ILBM/IFF standard file format, it became the de facto standard for animation files on the Amiga.The file format must have these characteristics:
- Be able to store, and playback, sequences of frames and to minimize both the storage space on disk and playback time.
- Maintain maximum compatibility with existing IFF formats and to be able to display the initial frame as a normal still IFF picture.
Amiga Anim7 format was created in 1992 by programmer Wolfgang Hofer.
A video file format originally created for the Commodore CDTV, and later adapted for the Amiga CD32, was called CDXL and was similar to the ANIM file format.
The ANIM format is supported by at least one current online image editor.
Technical overview
A minimum Anim file consists of three ILBM interleaved bitmap images. The first bitmap is a full image, necessary for the creation of the "next" frame whilst the other two are "delta" images, calculated as differences from the first one.The initial frame is a normal run-length-encoded, IFF picture, and this allows a preview of the contents of the file. Subsequent frames are then described by listing only their differences from a previous frame.
While the first frame is displayed, the subsequent frames are loaded into a buffer in graphics memory. The Amiga switches between the screens almost instantaneously while loading further frames using the blitter. Utilising its DMA capabilities, the graphics chipset could access memory without interrupting the CPU. This technique is called double buffering.
To better understand this, suppose one has two screens, called A and B, with the ability to instantly switch the display from one to the other. The initial frame is loaded in to screen A and B. Screen A is displayed. The differences between frame 1 and frame 2 are calculated and altered in screen B, which is then displayed. Then the differences from this and frame 3 are used to alter screen A, which is then displayed, and so on. Note that frame 2 is stored as differences from frame 1, but all other frames are stored as differences from two frames back.
ANIM is an IFF FORM and its chunk structure is as follows:
FORM ANIM
- FORM ILBM
- * BMHD
- * ANHD
- * CMAP
- * BODY
- FORM ILBM
- * ANHD
- * DLTA
- FORM ILBM
- * ANHD
- * DLTA
The initial FORM ILBM can contain all the normal ILBM chunks, such as CRNG, etc. The BODY will normally be a standard run-length-encoded data chunk. If desired, an ANHD chunk can appear here to provide timing data for the first frame. If it is here, the operation field should be =0.
The subsequent FORMs ILBM contain an ANHD, instead of a BMHD, which duplicates some of BMHD and has additional parameters pertaining to the animation frame. The DLTA chunk contains the data for the delta compression modes. If the older XOR compression mode is used, then a BODY chunk will be placed here. In addition, other chunks may be placed in each of these as deemed necessary. For example, the CMAP chunks to alter the color palette.
A basic assumption in ANIMs is that the size of the bitmap, and the display mode will not change through the animation.
The DLTA chunks are not interleaved bitmap representations, thus the use of the ILBM form is inappropriate for these frames. However, this inconsistency was not noted until there were a number of commercial products either released or close to release which generated/played this format.