ArticleslgStudy

science

ANI (file format)

ANI (file format) is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand ANI (file format) rather than just read about it. In short: The ANI file format is a graphics file format used for animated mouse cursors on the Microsoft Windows operating system. 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 cursors) of the animation.

ANI (file format) — main illustration
ANI (file format) — illustration

Key takeaways

  • ANI (file format) belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect ANI (file format) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of ANI (file format) from memory before moving on to harder problems.

Reference excerpt

The ANI file format is a graphics file format used for animated mouse cursors on the Microsoft Windows operating system. 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 cursors) of the animation.

History The concept of an animated mouse pointer originated on OS/2 Presentation Manager, whose animated pointers were produced by an early Microsoft animation tool later ported to Windows NT. The RIFF/ACON container was not part of the original 1991 RIFF specification; the ACON form type was registered by Microsoft in April 1993. Early third-party documentation described the AF_ICON flag in the anih header as selecting between two frame formats: with the flag set, each frame is a complete icon or cursor resource; without it, frames would be raw device-independent bitmaps described by the cx, cy, cBitCount and cPlanes header fields. This raw-bitmap mode did not appear in Microsoft's own published specification, however, and no version of Windows accepts a frame with the flag unset; in every animated cursor shipped with Windows the flag is set and those four header fields are zero. The Animated Cursor Editor for Windows NT (ANIEDIT) provides a reference implementation of the ANI format. Its source code was distributed as a sample in the Windows SDK — as source only, with compiled binaries provided instead in the Windows 95 and Windows NT Resource Kits — and is preserved in the MSDN October 2001 Library. The 16-bit Windows 3.x line had no animated cursor support of any kind. Windows NT 3.5 was the first version to load and display animated cursors, and shipped a set of ANI files — such as the animated hourglass — as part of its default cursor scheme; these early frames were 16-color (4 bpp) 32×32 images, some using a reversing "ping-pong" playback sequence. Windows 95 brought animated cursor support to the consumer line, adding a monochrome (1 bpp) fallback image to the first frame for display adapters running in 16 colors. On Windows 9x, animating a cursor required a protected-mode disk driver together with a suitable display driver; on systems lacking them the pointer was shown in color but did not animate. Windows Vista introduced 32-bit color cursors with its Aero theme, and its animated cursors were the first to store several sizes within each frame so that a larger pointer could be drawn at higher display scaling — the built-in aero_busy.ani, for example, carries 32×32, 48×48 and 64×64 variants in every frame, for 100%, 150% and 200% scaling respectively.

File structure An ANI file is a RIFF container with the chunk identifier ACON. It contains a mandatory animation header chunk (anih), a mandatory list of frame chunks (fram), and optional chunks for per-step timing (rate), frame sequencing (seq), and metadata (INFO).

#define AF_ICON 0x1

typedef struct { DWORD cbSizeof; // 36 DWORD cFrames; // unique frame count DWORD cSteps; // animation step count DWORD cx, cy; // unused (legacy) DWORD cBitCount, cPlanes; // unused (legacy) DWORD jifRate; // default rate in jiffies (1/60 s) DWORD fl; // flags; AF_ICON (0x1) must be set; see Sequence and playback } ANIHEADER;

RIFF('ACON' [LIST('INFO' [INAM(<ZSTR>)] // title (optional) [IART(<ZSTR>)] // author (optional) )] [<DISP-ck>] // display preview (optional) 'anih'(<ANIHEADER>) ['rate'(<DWORD>...)] // exactly cSteps DWORDs; per-step rates in jiffies; see Timing ['seq '(<DWORD>...)] // exactly cSteps DWORDs; 0-based frame indices; see Sequence and playback LIST('fram' 'icon'(<icon_data>)... // exactly cFrames icon chunks ) ) The cbSizeof field must be exactly 36; any other value causes the file to fail to load. The anih chunk must appear before rate, seq , and the fram list; this is the only strict ordering constraint defined in the specification. The INFO list may contain standard RIFF metadata sub-chunks, including INAM (title) and IART (author). All are null-terminated strings encoded in ASCII or the system ANSI code page; the original RIFF specification defines ISO 8859/1 as the default. Windows ignores all INFO sub-chunks when loading a cursor; the metadata is only read by third-party editors.

Frames The AF_ICON flag in anih is required and marks each frame in the fram list as a complete CUR-format resource. Because the frame format is identical to a standalone CUR file, a frame may contain images at multiple sizes within a single chunk — this capability is part of the original 1993 specification. Within each icon chunk, the dwImageOffset field of each directory entry is relative to the start of the chunk content and must fit within 16 bits. cFrames must be at least 1; a value of 1 is treated as a static cursor. Both cFrames and cSteps are effectively 16-bit on modern Windows: non-zero upper bits cause the file to fail to load. Without a seq chunk, cSteps must not exceed cFrames; with one, every frame index in the table must be less than cFrames. Because frames use the ICO/CUR image format, they may also contain PNG-compressed images since Windows Vista (see PNG format). PNG compression can reduce file size by around 40× compared to uncompressed BMP for typical semi-transparent cursors; existing Windows cursor tools only emit uncompressed BMP frames.

Timing Frame rates are measured in jiffies, with one jiffy equal to 1/60 of a second, or approximately 16.7 ms. The anih header specifies a default rate (jifRate) applied to all steps. The optional rate chunk overrides this with a per-entry rate table, allowing individual frames to be held for different durations. The table must contain exactly cSteps entries.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with ANI (file format)

Start with the simplest possible case. Write down what ANI (file format) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to ANI (file format) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about ANI (file format) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of ANI (file format)

In research
ANI (file format) appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses ANI (file format) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
ANI (file format) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Animated graphics file formats, Raster graphics file formats, Windows architecture, so understanding it makes those chapters shorter.
In everyday life
Look for ANI (file format) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “ANI (file format)” →

How to study ANI (file format) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what ANI (file format) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain ANI (file format) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is ANI (file format) in simple terms?

The ANI file format is a graphics file format used for animated mouse cursors on the Microsoft Windows operating system. 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 cursors) of the…

Why does ANI (file format) matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study ANI (file format)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on ANI (file format).

Tags

  • Animated graphics file formats
  • Raster graphics file formats
  • Windows architecture

Keep exploring