Top Qs
Timeline
Chat
Perspective
ANI (file format)
File format for animated mouse cursors From Wikipedia, the free encyclopedia
Remove ads
The ANI file format is a graphics file format used for animated mouse cursors on the Microsoft Windows operating system.[2]
This article needs additional citations for verification. (April 2024) |
The format is based on the Microsoft Resource Interchange File Format, which is used as a container for storing the individual frames (which are standard Windows icons) of the animation.
Remove ads
File structure
Summarize
Perspective
The RIFF file structure description:
#define AF_ICON 0x1 // Windows format icon/cursor animation. #define AF_SEQUENCE 0x2 // Animation is sequenced. typedef struct { DWORD cbSizeof; // Should be sizeof(ANIHEADER) = 36 bytes. DWORD cFrames; // Count of frames in animation. DWORD cSteps; // Number of steps in the cursor. DWORD cx, cy; // Not used when AF_ICON is set. DWORD cBitCount, cPlanes; // Not used when AF_ICON is set. DWORD jifRate; // Default display rate, in jiffies (1/60s). DWORD fl; // AF_ICON should be set. AF_SEQUENCE is optional. } ANIHEADER; RIFF('ACON' [LIST('INFO' [INAM(<ZSTR>)] // Cursor title. Optional. [IART(<ZSTR>)] // Author name. Optional. )] 'anih'(<ANIHEADER>) // ANI file header. ['rate'(<DWORD...>)] // Rate table (array of jiffies). // If the AF_SEQUENCE flag is set // then the count is ANIHEADER.cSteps, // otherwise ANIHEADER.cFrames. ['seq '(<DWORD...>)] // Sequence table (array of frame index values). // Should be present when AF_SEQUENCE flag is set. // Count is ANIHEADER.cSteps. LIST('fram' // List of frames data. Count is ANIHEADER.cFrames. 'icon'(<icon_data_1>) // Frame 1 'icon'(<icon_data_2>) // Frame 2 ... ) )
Individual frames are in ICO format.
Frame rates are measured in jiffies, with one jiffy equal to 1/60 of a second, or 16.666 ms.
Sequence information present in the file determines the sequence of frames, and allows frames to be played more than once, or in a different order than that in which they appear in the file. For example, if the animation contains three different images numbered 1, 2 and 3, and the sequence is 1-2-3-2-1, (five frames) then only three icons need to be stored in the file, thereby saving storage space.
If an ANI file is used as Windows cursor, the sequence will loop. There is no way of influencing that behavior.[3]
Animated Cursor Editor for Windows NT (ANIEDIT) source code from MSDN October 2001 Library is a good source of knowledge about ANI file format structure.[4]
Remove ads
See also
References
External links
Wikiwand - on
Seamless Wikipedia browsing. On steroids.
Remove ads