High Efficiency Image File Format
Comparison of JPEG, JPEG 2000, JPEG XR and HEIF files at similar filesizes
|Internet media type|
|Uniform Type Identifier (UTI)||public.heif, public.heic|
|Developed by||Moving Picture Experts Group (MPEG)|
|Type of format||Image Container Format|
High Efficiency Image File Format (HEIF), also known as High Efficiency Image Coding (HEIC), is a file format for individual images and image sequences. It was developed by the Moving Picture Experts Group (MPEG) and is defined by MPEG-H Part 12 (ISO/IEC 23008-12). The MPEG group claims that twice as much information can be stored in a HEIF image as in a JPEG image of the same size, resulting in a better quality image. HEIF also supports animation, and is capable of storing more information than an animated GIF at a small fraction of the size.
The HEIF specification also defines the means of storing High Efficiency Video Codec (HEVC)-encoded intra images and HEVC-encoded image sequences in which inter prediction is applied in a constrained manner.
HEIF image files are stored with filename extensions .heif or .heic.
HEIF files can store the following types of data:
- Image Items
- Storage of individual images, image properties and thumbnail(s).
- Image Derivations
- Derived images enable non-destructive image editing, and are created on the fly by the rendering software using editing instructions stored separately in the HEIF file. These instructions (rectangular cropping, rotation by 90, 180, or 270 degrees, timed graphic overlays, etc.) and images are stored separately in the HEIF file, and describe specific transformations to be applied to the input images. The storage overhead of derived images is small.
- Image Sequences
- Storage of multiple time-related and/or temporally predicted images (like a burst-photo shot or cinemagraph animation), their properties and thumbnails. Different prediction options can be used in order to exploit the temporal and spatial similarities between the images. Hence, file sizes can be drastically reduced even when tens of images are stored in the same HEIF file.
- Auxiliary Image Items
- Storage of image data, such as an alpha plane or a depth map, which complements another image item. These data are not displayed as such, but used in various forms to complement another image item.
- Image Metadata
- Storage of EXIF, XMP and similar metadata which accompany the images stored in the HEIF file.
Like JPEG, HEIF is based on the discrete cosine transform (DCT), a form of lossy compression. A key difference in their DCT implementations is that, while JPEG uses 8x8 standard DCT blocks, HEIF uses integer DCT blocks with varied sizes between 4x4 and 32x32 pixels. This allows more efficient DCT compression.
In addition, HEIF has animation support, which JPEG lacks. Compared to the animated GIF format, which lacks DCT compression, HEIF allows significantly more efficient compression. HEIF stores more information and produces higher-quality animated images at a small fraction of an equivalent GIF's size.
HEVC Image File Format
- HEVC image players are required to support rectangular cropping and rotation by 90, 180, and 270 degrees. The primary use case for the mandatory support for rotation by 90 degrees is for images where the camera orientation is incorrectly detected or inferred. The rotation requirement makes it possible to manually adjust the orientation of an image or image sequence without needing to re-encode it. Cropping enables the image to be re-framed without re-encoding. (The HEVC file format, however, does include the option to store pre-derived images.)
- Samples in image sequence tracks must be either intra-coded images or inter-picture predicted images with reference to only intra-coded images. These constraints of inter-picture prediction reduce the decoding latency for accessing any particular image within an HEVC image sequence track.
As HEIF is a container format, it can contain still images and image sequences (where a file contains more than one single image) that are coded in different formats. Currently, these include HEVC and H.264/MPEG-4 AVC (and JPEG for thumbnail/secondary images), though other coding formats may be added in the future. The two main filename extensions are .heif (for any codec) or .heic (for HEVC codec), along with a less common .avci that is typically used for H.264/AVC encoded files.
In Apple's implementation, for single images they have chosen the latter .heic filename extension (.heics for image sequence files) as the only one they will produce for photos, which indicates clearly that it went through HEVC encoding. However, they will support playback of both H.264/AVC encoded .avci files (.avcs for image sequence files), and also .heif files (.heifs for image sequence files) created on other devices that are encoded using any codec, provided that codec is supported by them.
HEIF is supported by the following among others:
- Operating systems
- Windows 10 version 1803 and later
- macOS High Sierra and later
- iOS 11 and later
- Android Pie and later
- Image editing software
- Adobe Lightroom (macOS High Sierra, iOS 11+, Windows 10, and Android 9+)
- Affinity Photo
- Zoner Photo Studio X
- Pixelmator (version 3.7 and above)
- Nokia provides an open source Java HEIF decoder.
- The open source library "libheif" supports reading and writing HEIF files.
- Web browsers
HEIF itself is a container, and when containing images and image sequences encoded in a particular format (e.g., HEVC or H.264/AVC) its use becomes subject to the licensing of patents on the coding format.
- Advanced Video Coding (AVC, aka H.264) – an older encoding format for video and images, first standardized in 2003
- High Efficiency Video Coding (HEVC, aka H.265) – an encoding format for video and images, first standardized in 2013
- ISO base media file format – a file format standard that covers HEIF and other similarly formatted multimedia files, first standardized in 2001
- MPEG-H – a suite of standards that includes HEIF and HEVC
- AV1 – royalty-free video and image encoding format
- Better Portable Graphics – another image file format using HEVC encoding, published by an individual author in 2014
- AV1 Image File Format – image format under development by the Alliance for Open Media, based on the AV1 video codec
- WebP – an image format based on the VP8 video format
- JPEG – one of the most common and supported lossy image formats, released in 1992 by ITU-T and ISO/IEC
- Free Lossless Image Format (FLIF) – FOSS lossless image format released in 2015, claiming to outperform PNG, lossless WebP, lossless BPG and lossless JPEG 2000
- "Requirements for still image coding using HEVC | MPEG". mpeg.chiariglione.org. 29 July 2013. Retrieved August 24, 2018.
- "Requirements for HEVC image sequences | MPEG". mpeg.chiariglione.org. 29 July 2013. Retrieved August 24, 2018.
- "Evidence motivates MPEG to launch new standardization effort for HDR". 26 June 2015. Retrieved August 24, 2018.
- M. M. Hannuksela; E. B. Aksu; V. K. Malamal Vadakital; J. Lainema. "Overview of the High Efficiency Image File Format". JCT-VC document JCTVC-V0072, Oct. 2015.
- Thomson, Gavin; Shah, Athar (2017). "Introducing HEIF and HEVC" (PDF). Apple Inc. Retrieved 5 August 2019.
- "HEIF Comparison - High Efficiency Image File Format". Nokia Technologies. Retrieved 5 August 2019.
- "HEIF Technical Information - High Efficiency Image File Format". nokiatech.github.io. Images in HEIF Files. Retrieved 2018-02-01.
- "Working with HEIF and HEVC - WWDC 2017 - Videos". Apple Developer. Retrieved 2019-01-19.
- "High Efficiency Image File Format". Apple. June 2017. Event occurs at 0:09:26. Retrieved November 22, 2017.
- Shankland, Stephen (June 16, 2017). "How Apple is squeezing more photos into your iPhone – FAQ: Apple's newest iPhone software attempts to move the world out of the JPEG era". CNET. Retrieved November 21, 2017.
- "Introducing HEIF and HEVC". Apple. June 6, 2017. Event occurs at 0:13:47. Retrieved November 22, 2017.
- Czachurski, Marcin (June 29, 2018). "macOS Mojave dynamic wallpaper". ITNEXT. Retrieved September 18, 2018.
- "Announcing Windows 10 Insider Preview Build 17123 for Fast Ring Subscribers". Retrieved 2018-03-16.
- Hollister, Sean (June 5, 2017). "Apple answers iPhone storage woes with smaller photos, videos". CNET. CBS Interactive. Retrieved September 30, 2017.
- Snell, Jason (September 20, 2017). "iOS 11: HEVC, HEIF, and what you need to know about these new video and photo formats". Macworld. Retrieved September 30, 2017.
- Shu, Lee (September 19, 2017). "Here's what HEIF and HEVC are, and why they'll improve your iPhone with iOS 11". Digital Trends. Retrieved September 30, 2017.
- "Previewing Android P". Android Developers Blog. Retrieved 2018-03-07.
- "HEIC and HEVC media files support in Lightroom and Camera Raw". helpx.adobe.com. Retrieved 2019-07-29.
- "GIMP 2.10.2 Released". GIMP News. 2018-05-20. Retrieved 2018-05-22.
- "paint.net 4.2 is now available!". 2019-07-13. Retrieved 2019-07-13.
- "Krita 4.1 Release Notes". Retrieved 2018-11-19.
- "Zoner Photo Studio X brings support for the HEIF image format to Windows". DPReview. Retrieved 2018-03-20.
- "HEIF support comes to Windows with Zoner Photo Studio - DIY Photography". DIY Photography. 2017-11-28. Retrieved 2018-03-20.
- Friday, William Gallagher; November 16; 2018; PT, 06:59 am. "How to work with, edit, and share HEIC images without data loss". AppleInsider. Retrieved 2019-01-19.
- "macOS High Sierra tech preview: A quick look at the stuff you can't see". 2017-06-19. Retrieved 4 July 2017.
If there's one major downside to both HEVC and HEIF, it's that they're covered by patents that may need to be licensed for use in various apps and services.
- "Converting a JPEG to the new HEIF format". Retrieved 4 July 2017.
HEIF and HEVC are extensively covered by patents, which means there could be legal implications to implementing HEIF support, particularly in paid software or a hardware product.
- Jan Ozer; Dror Gill (12 June 2017). "Apple Endorses New Image Format, HEIF". Retrieved 31 October 2017.
- "Apple wants to shrink your photos, but a new format from Google and Mozilla could go even farther". CNET. 2018-01-19. Retrieved 2018-02-01.