The useful part, up front

What you’ll take away

  • Count files, items, image items and intended standalone pictures separately; the totals need not match.
  • The primary image selects a default representation, while a derived grid identifies how one image is reconstructed.
  • Thumbnail, derivation and metadata references have different directions and meanings.
  • Tile positions outside the output are a geometric boundary, not a measure of compressed size or a reason to omit required inputs.
  • Verify the actual export objective: one visible result does not establish preservation of the original collection and relationships.
01

One file can have several equally correct image counts

You open one HEIF file and see one photograph. An inspection tool then lists several image objects. That does not immediately mean the viewer lost photographs or that the tool found duplicates. HEIF can store individual pictures, inputs used to assemble a picture, smaller previews, auxiliary images and metadata. It can also carry image sequences. [1][3] The useful question is what each object does. Counting every object as another photograph mixes the materials used to produce a picture with the pictures someone intended you to browse.

We will follow an invented file containing nine items. Item 10 assembles four hidden tile images, numbered 21 to 24. Item 40 is its thumbnail, item 50 supplies transparency information, and item 60 contains Exif metadata. Item 70 is a separate photograph. Eight items are image items; the metadata item is not. We intend two standalone photographs, 10 and 70, and select 10 as the default. These are original bookkeeping and geometry examples, not a decoded test file. Their purpose is to show why one file, nine items, eight image items and two intended photographs can all describe the same arrangement.

The count depends on the question. All counts refer to the same hypothetical inventory. The standalone set is a stated presentation intention, not an API result.
All counts refer to the same hypothetical inventory. The standalone set is a stated presentation intention, not an API result. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
02

The primary image is a selection, not a file-order rule

HEIF has a cover or primary image to represent the file when no other display preference is available. Nokia's reader examples ask for that primary item explicitly; a separate example asks for the collection's master images. [1][2] Those are different questions. A program looking for a default picture need not present a contact sheet of everything inside. Conversely, an inspection tool can expose useful internal objects that an ordinary photo viewer has no reason to show as separate photographs.

In our file, the primary choice points to item 10. Imagine changing only that choice to item 70 while keeping all nine items and their image contents. The preferred opening picture changes, but the inventory does not. Item 70's larger number does not make it less eligible merely because it comes after 10 numerically. Nor does being primary mean that an image contains the most detail, is the newest photograph or occupies the most bytes. Those are separate properties. When two programs show different pictures, first identify their selected item before concluding that either has damaged the file.

03

Four tile images can be the ingredients of one picture

A derived image is described through an operation and its input images. A grid is one example: it assembles equally sized image tiles into a larger picture. The libheif documentation explains that each grid tile is stored as a separate image. [1][4] Separate storage does not make each tile a separate scene. The division can simply be how one intended photograph is represented. That is why an object listing may be much longer than the collection a reader expects to browse.

Our item 10 is the assembly instruction for four 512-by-512-pixel inputs. Tiles 21 and 22 form the top row; 23 and 24 form the bottom row. They are marked hidden in this fixture because they are ingredients rather than standalone presentation choices. HEIF's hidden role prevents such an input from being displayed as an independent output. [1] Item 10 still counts as an image item even though its picture is obtained from those inputs. Counting only compressed tile payloads misses the assembled object; counting every tile as an album photograph invents browsing choices we did not specify.

04

A reference tells you which relationship to follow

A link between two objects needs a meaning and a direction. In Nokia's documented examples, a thumbnail's thmb reference points from the thumbnail to its master image. A dimg reference runs from a derived image to its inputs. Exif metadata describes an image through a cdsc reference directed toward that image. [1][2] These links answer different questions: which picture does this preview represent, what inputs produce this result, and which picture does this information describe?

For our invented file, the selected relationships include 40 to 10 for the thumbnail, 10 to each of 21–24 for the grid inputs, and 60 to 10 for the metadata. If you start at image 10 and want its thumbnail, you search for the thumbnail reference arriving at 10. You do not reinterpret the thumbnail as an input tile. Likewise, finding metadata about 10 does not add another image to the grid. Direction and relationship type prevent that confusion. The diagram groups the four tiles for readability; it does not introduce a new group item into the nine-item inventory.

Different reference types have different directions. Selected links only. The tile node groups four separate items for readability; the alpha auxiliary and photo 70 are omitted.
Selected links only. The tile node groups four separate items for readability; the alpha auxiliary and photo 70 are omitted. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
05

An extra image can describe transparency rather than another scene

An auxiliary image helps interpret or display another image. Nokia's HEIF overview gives an alpha plane and a depth map as examples. A thumbnail has a different role: it represents a picture at smaller resolution. [1] These categories explain why an image inspector can find additional images without finding additional photographs to browse. The word image describes a kind of stored representation; its role tells you whether someone should treat it as another view of the scene, a preview or supporting information.

In our file, item 50 is an 800-by-700 alpha auxiliary associated with image 10. Its role is transparency information for that picture, not a third standalone photograph. Item 40 is a 160-by-140 thumbnail of 10. Item 60 is Exif metadata, so it is not included in our image-item count at all. These distinctions also change what an export question means. Asking whether the picture survived is different from asking whether its transparency information, thumbnail relationship and metadata association survived. None of those questions can be answered by counting the destination files alone.

06

Do not add role counts as though every role had its own object

HEIF roles can overlap. The overview explicitly allows an image to have more than one role. [1] Our item 10 is both the chosen cover and the derived grid image. Those labels describe the same item from two viewpoints: why it is selected and how it is constructed. Adding one cover to one derived image and assuming two different objects would count item 10 twice. A file report can therefore list several role totals without those totals forming a valid item total.

Write the identifiers beside the labels when a report seems contradictory. In this fixture, the primary set is {10} and the derived set is also {10}; their combined membership still contains one item. The hidden-input set is {21, 22, 23, 24}. Our two intended standalone choices remain {10, 70}, although a viewer opening only the primary image shows one. The report is useful when it tells you which set it counted. Phrases such as 'eight images found' become misleading only when someone silently translates them into 'eight independent photographs should appear in the gallery.'

07

A grid can extend beyond the final picture

Our four 512-by-512 tiles form a 1,024-by-1,024 rectangle, but suppose the grid's declared output is 800 pixels wide and 700 high. The libheif grid documentation allows output dimensions that are not whole multiples of the tile dimensions, with excess at the right and bottom excluded from the result. [4] The final picture therefore need not display every position in the full tile rectangles. This is a geometric boundary, not evidence that a thumbnail was enlarged or that part of an unrelated photograph went missing.

The top-left tile contributes 512 × 512 = 262,144 positions. The top-right contributes 288 × 512 = 147,456. Below them, the visible heights are 188 pixels, giving 96,256 positions on the left and 54,144 on the right. Together they make 560,000, exactly 800 × 700. The full four rectangles contain 1,048,576 positions, so 488,576 lie outside this output. Those are image-position counts. They do not measure compressed bytes, allocated memory, decoder workload or image quality. All four tiles still contribute a visible region to this particular picture.

Visible tile regions sum to the declared output. Original unrotated 2 × 2 grid: each tile is 512 × 512; output is 800 × 700. Counts are positions, not bytes or memory.
Original unrotated 2 × 2 grid: each tile is 512 × 512; output is 800 × 700. Counts are positions, not bytes or memory. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
08

A working thumbnail does not prove the full picture is reconstructable

The documented libheif grid-writing path requires every grid tile to be supplied; skipped tiles are not allowed for that grid representation. [4] This is different from excluding the outside border of a supplied tile from the final picture. In our example, the lower-right tile contributes 54,144 visible positions. If its data were unavailable, the missing object would matter even though much of its full rectangle lies outside the output. Unused border area does not turn the rest of that tile into optional material.

Now imagine a program successfully reading thumbnail 40 while being unable to obtain one required grid input. The small preview could be available without establishing that image 10 can be reconstructed completely. This is a logical example, not a report that a tested application behaves that way. Nokia's examples retrieve thumbnails and derived inputs through separate operations. [2] A useful problem report would identify which representation opened, its dimensions, and whether the full requested image completed. 'I can see a preview' is valuable evidence, but it answers a narrower question than 'all the picture's required inputs are usable.'

09

A sequence has timing that a still-image count cannot supply

A HEIF file can contain still items and image-sequence tracks together. A sequence track carries samples and timing; it is not just a longer list of still-image items. [1][5] This distinction matters when a file opens as one picture in one context and offers motion in another. The presence of several stored objects alone does not tell you whether motion was intended, how long it lasts, or which samples belong to the sequence. Those questions require the track information.

For a separate invented track, use a clock of 1,000 ticks per second and three consecutive display durations of 100, 200 and 500 ticks, with no gaps or repetition. They last 0.1, 0.2 and 0.5 seconds, making 0.8 seconds in total. The libheif sequence documentation explains converting sample duration through the track's timescale. [5] Three samples do not imply three seconds or three equal durations. This track example is separate from the nine-item inventory; adding its samples to that item count would mix two different kinds of record.

Three timed samples do not imply equal durations. A separate hypothetical track at 1,000 ticks/s, with consecutive intervals and no gaps, edits or repetition.
A separate hypothetical track at 1,000 ticks/s, with consecutive intervals and no gaps, edits or repetition. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
10

Reading the container and decoding its pictures are different capabilities

HEIF supplies the structure around the image data, while decoding also depends on how those images are encoded. The libheif project documents support for multiple coding formats and the option to build with only a subset of codec backends. [3] This gives a concrete reason why a general format-support label is incomplete. A program may recognize a container and its primary selection without necessarily providing every decoder or every presentation feature needed by a particular file.

For our invented file, first discovering that item 10 is primary is not the same operation as decoding its four inputs and assembling the output. A separate program might correctly inspect the inventory without promising to display it. The libheif README likewise shows primary-image retrieval separately from decoding. [3] When checking a compatibility problem, record the application and version, the selected representation and the operation requested. An extension or one successful thumbnail is too little information to conclude that the complete grid, its auxiliary image and a separate sequence are all supported by that installation.

11

A successful export can preserve the picture without preserving its collection

Sharing can change the representation that reaches someone else. Apple's support guidance says that some sharing methods may automatically deliver a more compatible format, and it describes deliberate JPEG or PNG exports. [6] That is conditional behavior, not a promise that every share is converted. It means that the operation and destination matter. A picture arriving successfully does not, by itself, prove that the original container and all of its relationships arrived with it.

Imagine an export operation defined to render only primary image 10 into one still picture. Its result could satisfy a request to share that appearance while leaving out independent photo 70, the separate thumbnail relationship and the grid's item structure. Whether it carries transparency or metadata is another question about the chosen export. This is a hypothetical operation, not a claim about a particular app's defaults. Keep the original container when those other objects or future choices matter, and inspect the delivered copy for the purpose it is meant to serve. A file that opens is only the beginning of that check.

12

Check the object you meant to keep

Start an investigation by naming the intended result: one visible picture, both standalone photographs, the original container, or a timed sequence. Then record the selected image and the available inventory. If tools expose them, distinguish thumbnails, auxiliary images, hidden inputs and metadata. libheif documents an inspection utility that can report file information and its box structure, but its existence does not guarantee that every photo application exposes those details. [3] Missing interface detail should remain unknown rather than become evidence that an object is absent.

For our fixture, a sensible report could say: primary 10 opened at 800 by 700; photo 70 was also enumerated; the export contained only the selected still picture. Each clause answers a specific question. A different report might say that only thumbnail 40 was available, leaving full-grid reconstruction unresolved. Those descriptions are more useful than a single image count. Follow selection, input relationships and the delivered result, and compare them with the purpose you started with. You can then identify what was preserved or left unverified without treating every supporting image object as another missing photograph.

Follow the representation across the delivery boundary. An original inspection method. A successful preview or export answers a narrower question than preservation of the whole container.
An original inspection method. A successful preview or export answers a narrower question than preservation of the whole container. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
Follow the evidence

Sources & further reading

Explore the references behind this guide. External pages may change after our review.

  1. HEIF Technical Information - High Efficiency Image File Format
    Nokia Technologies · Accessed 7 Nov 2026
  2. III. HEIF Reader API and Usage Examples · nokiatech/heif Wiki · GitHub
    Nokia Technologies · Accessed 7 Nov 2026
  3. libheif/README.md at master · strukturag/libheif · GitHub
    Struktur AG / libheif project · Accessed 7 Nov 2026
  4. Reading and Writing Tiled Images · strukturag/libheif Wiki · GitHub
    Struktur AG / libheif project · Accessed 7 Nov 2026
  5. Reading and Writing Sequences · strukturag/libheif Wiki · GitHub
    Struktur AG / libheif project · Accessed 7 Nov 2026
  6. Using HEIF or HEVC media on Apple devices - Apple Support
    Apple · Accessed 7 Nov 2026

Article updated 7 Nov 2026.

Found something we should revisit?

Good explanations get better with thoughtful feedback.

Suggest a correction