Introduction
An ANI file is an animated mouse pointer for Windows, such as the spinning busy cursor. It holds a series of frames, each a complete cursor or icon, and the time to show each one. Pointer schemes in the Windows Mouse settings still use them.
The frames inside are ordinary ICO and CUR images, so each frame can have several sizes and its own hotspot.
Structure
An ANI file is a RIFF file with the form type ACON. Like every RIFF
file, it is a series of chunks, each a four-letter ID, a little-endian length and the
data, padded to an even length.
The anih chunk is the header: 36 bytes giving the number of frames, the
number of steps in the animation, the default display rate in jiffies (sixtieths of a
second) and flags. The frames are icon chunks inside a
LIST chunk of type fram. An optional rate chunk
gives a display time for each step, and an optional seq chunk gives the
order in which frames are shown, so a frame can be reused. A LIST chunk
of type INFO can carry a title and an author. See
Chunks and
Header (anih).
Microsoft published the layout in its Multimedia Data Standards Update of April 1994. The same RIFF data, unchanged, is also stored inside Windows programs as resources of type 21 (animated cursor) and 22 (animated icon).
0RIFF chunk ID, length, form typeACON12 bytes…LIST INFO title and author (optional)varies…anih frames, steps, display rate, flags44 bytes…rate and seq timing and order (optional)varies…LIST fram one icon chunk per framevaries
Not described
The chunk and header pages follow Wikipedia, daubnet, gdgsoft’s AniTuner help and the Zig resinator source.
Known, not yet covered
- Reference: Microsoft’s RIFFNEW.pdf (the RIFF specification that defines ANI) was not read, because no PDF text tool was available when the pages were written.
The
AF_SEQUENCEflag rests on third-party descriptions. - Viewer: there is no ANI plugin yet.
Unknown
- Reference: the effect of a clear
AF_ICONflag (raw DIB frames, according to daubnet): Wikipedia says no Windows version accepts such a file, marked “citation needed”, and neither claim has a primary source.
Links
Software
- Windows – its Mouse settings use ANI files as animated pointers
- RealWorld Cursor Editor – free editor for still and animated cursors (Windows)
- Greenfish Icon Editor Pro – free icon and cursor editor (Windows)
- IcoFX – icon and cursor editor (Windows)
Reference
- Multimedia Data Standards Update – Microsoft’s 1994 RIFF update that defines the ACON form, hosted by McGill University (PDF)
- About animated cursors – GDG Software’s notes on the chunks and the header