Introduction
HEIF is a container for still images and image sequences, standardised by MPEG as ISO/IEC 23008-12. A HEIC file is a HEIF file whose images are compressed with HEVC (H.265), the same codec used for high definition video. It gives files roughly half the size of a JPEG of similar quality.
Apple made HEIC the default photo format on iPhones with iOS 11 in 2017. A HEIF file
can also hold several images, depth maps, alpha planes, thumbnails and Exif metadata.
Files with other codecs inside often use the .heif extension.
Structure
A HEIF file uses the ISO base media file format, the same box structure as MP4. Each
box is a 4-byte big-endian size, a 4-byte type and its contents. The file starts with an
ftyp box, so the text ftyp appears at offset 4, followed by
brands such as heic, heix or mif1.
A meta box describes the images: which item is the primary image, the
list of items, where each item's data lies in the file, and properties such as size
and colour. The compressed image data itself sits in an mdat box. Large
photos are often stored as a grid of smaller tiles, each coded separately.
0ftyp major brand and compatible brandsvaries…meta handler, primary item, item info, item locations, propertiesvaries…mdat the coded image datavaries
Links
Software
- Apple Photos and Preview (macOS, iOS)
- Microsoft Photos, with the HEIF and HEVC extensions (Windows)
- GIMP (Windows, macOS, Linux)
- Adobe Photoshop (Windows, macOS)
- XnView MP (Windows, macOS, Linux)
- ImageMagick (Windows, macOS, Linux)
Developers
- libheif, C library that reads and writes HEIF and AVIF
Reference
- HEIF technical information, Nokia Technologies, with an overview of the standard and example files