| standard = ISO/IEC 23008-12 (MPEG-H Part 12)
}}
'''High Efficiency Image File Format''' ('''HEIF''') is an international standard defined by MPEG-H Part 12 (ISO/IEC 3008-12), first published by ISO in 2017. It is designed as a container for photographic images in any image encoding. '''HEIF is a special case of the general ISO BMFF format''', in which all data is encapsulated in typed boxes, with a mandatory ftyp box that is used to indicate particular file types. The initial specification for HEIF provided usage details for three compression schemes, the widely supported JPEG encoding for still raster images and two video encodings that are also applicable to still image items, namely Advanced Video Coding (AVC, aka MPEG-4, Part 10 and H.264) and High Efficiency Video Coding (HEVC aka PEG-H Part 2 and H.265).
'''High Efficiency Image File Format''' ('''HEIF''') is a digital [[container format]] for storing individual [[digital image]]s and image sequences. The standard covers [[multimedia]] files that can also include other media streams, such as [[timed text]], audio and video.<ref name="JCTVC" />
ISO Base Media File Format official specification (of which HEIF is a special case) defines multiple subtypes in relations to possible encodings:
HEIF can store images encoded with multiple coding formats, for example both [[Standard-dynamic-range video|SDR]] and [[High-dynamic-range video|HDR]] images. [[High Efficiency Video Coding|HEVC]] is an image and video encoding format and the default image codec used with HEIF. HEIF files containing HEVC-encoded images are also known as '''HEIC''' files. Such files require less storage space than the equivalent quality [[JPEG]].<ref name="CNET" /><ref name="LesShu" />
* MJP2_FF, Motion JPEG 2000 File Format
HEIF files are a special case of the [[International Organization for Standardization|ISO]] Base Media File Format ([[ISO base media file format|ISOBMFF]], ISO/IEC 14496-12), first defined in 2001 as a shared part of [[MP4]] and [[JPEG 2000]]. Introduced in 2015, it was developed by the [[Moving Picture Experts Group]] (MPEG) and is defined as Part 12 within the [[MPEG-H]] media suite (ISO/IEC 23008-12).
* MP4_FF_2, MPEG-4 File Format, version 2
* MP4_FF_AVCE, MPEG-4 File Format for AVC (Extensions; Part 15)
* JP2_FF, JPEG 2000 Part 1 (Core) jp2 File Format
* JPX_FF, JPEG 2000 Part 2 (Extensions) jpf File Format
* JPM_FF, JPEG 2000 Part 1 (Compound) jpm File Format
* JPEG_XL, JPEG XL Image Encoding
* JXL, JPEG XL File Format
* HEIF, High Efficiency Image File Format. Some internal structures required for HEIF were added into the ISO_BMFF specification in a 2018 amendment. (ISO/IEC 14496-12:2015/Amd 2:2018)
According to official specifications Apple HEIC registered brand is using Main or Main Still Picture profile of HEVC with an 8-bit per channel color depth and chroma subsampling of 4:2:0, while Sony and Canon HIEX registered brand may additionally increase the bit-depth to 10 bits per channel and chroma subsampling to 4:2:2 or 4:4:4.
== History ==
{{anchor|HEIC}}{{anchor|HEVC}}
=== HEIC: HEVC in HEIF ===
[[High Efficiency Video Coding]] (HEVC, ITU-T H.265)<ref>{{cite web|url=https://tidbits.com/2020/06/26/what-the-heic-apples-highly-compressed-image-format-still-confuses/|title=What the HEIC? Apple's Highly Compressed Image Format Still Confuses|publisher=TidBITS|first=Glenn|last=Fleishman|date=26 June 2020|access-date=28 June 2020|archive-date=28 June 2020|archive-url=https://web.archive.org/web/20200628103743/https://tidbits.com/2020/06/26/what-the-heic-apples-highly-compressed-image-format-still-confuses/|url-status=live}}</ref> is an encoding format for graphic data, first standardized in 2013.
It is the primarily used and implied default codec for HEIF as specified in the normative Annex B to ISO/IEC 23008-12 ''HEVC Image File Format''.
While not introduced formally in the standard, the acronym <dfn><abbr title="High-Efficiency Image Codec">HEIC</abbr></dfn> (High-Efficiency Image Codec) is used as a ''brand'' and in the MIME subtypes <code>image/heic</code> and <code>image/heic-sequence</code>. If the content conforms to certain [[HEVC#Profiles|HEVC profiles]], more specific brands can be used: <dfn>HEIX</dfn> for Main 10 of HEVC, <dfn>HEIM</dfn> for (Multiview) Main profile, and <dfn>HEIS</dfn> for (Scalable) Main (10) profile of L-HEVC.
A HEIC photo takes up about half the space of an equivalent quality JPEG file.<ref name=HEVCApril2012I0461>{{cite news |title=On HEVC still picture coding performance |first1=Jani |last1=Lainema |first2=Kemal |last2=Ugur |publisher=JCT-VC |url=http://phenix.it-sudparis.eu/jct/doc_end_user/current_document.php?id=5721 |date=2012-04-20 |access-date=2013-01-22}}</ref> The initial HEIF specification already defined the means of storing HEVC-encoded [[Video compression picture types|intra images]] (''i-frames'') and HEVC-encoded image sequences in which [[inter frame|inter prediction]] is applied in a constrained manner.
HEVC<!-- or HEIF? --> image players are required to support rectangular cropping and rotation by one, two, and three quarter-turns. 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 a still image or an image sequence without needing to re-encode it. Cropping enables the image to be re-framed without re-encoding. The HEVC file format also includes the option to store pre-derived images.<ref name="Nokia">{{cite web |url=https://nokiatech.github.io/heif/technical.html |title=HEIF Technical Information |subject=High Efficiency Image File Format |publisher=Nokia |website=nokiatech.github.io |at=Images in HEIF Files |access-date=2018-02-01 |archive-date=2018-02-01 |archive-url=https://web.archive.org/web/20180201152802/http://nokiatech.github.io/heif/technical.html |url-status=live }}</ref>
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 a HEVC image sequence track.
The ''.heic'' and ''.heics'' file name extensions are conventionally used for HEVC-coded HEIF files.<ref name="WWDC2017 511">{{cite web |url=https://developer.apple.com/videos/play/wwdc2017/511 |title=Working with HEIF and HEVC - WWDC 2017 - Videos |website=Apple Developer |access-date=2019-01-19 |archive-date=2019-01-20 |archive-url=https://web.archive.org/web/20190120194504/https://developer.apple.com/videos/play/wwdc2017/511 |url-status=live }}</ref> Apple products, for instance,<ref name="WWDC2017 513">{{cite web |url=https://developer.apple.com/videos/play/wwdc2017/513 |title=High Efficiency Image File Format |time=0:09:26 |publisher=[[Apple Inc.|Apple]] |date=June 2017 |access-date=2017-11-22 |archive-date=2017-12-01 |archive-url=https://web.archive.org/web/20171201032622/https://developer.apple.com/videos/play/wwdc2017/513 |url-status=live }}</ref> will only produce files with these extensions, which indicate clearly that the data went through HEVC encoding.<ref name="CNET">{{cite web |url=https://www.cnet.com/news/apple-ios-boosts-heif-photos-over-jpeg-wwdc |title=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. |publisher=[[CNET]] |first=Stephen |last=Shankland |date=June 16, 2017 |access-date=2017-11-21 |archive-date=2017-11-16 |archive-url=https://web.archive.org/web/20171116181530/https://www.cnet.com/news/apple-ios-boosts-heif-photos-over-jpeg-wwdc/ |url-status=live }}</ref>
{{anchor|AVCI}}{{anchor|AVC}}
The registered MIME types are <code>image/avci</code> for still images and <code>image/avcs</code> for sequences. The format is simply known as AVCI.
Apple products support playback of AVC-encoded ''.avci'' still image files and ''.avcs'' image sequence files<ref name="WWDC2017 513">{{cite web |date=June 2017 |title=High Efficiency Image File Format |url=https://developer.apple.com/videos/play/wwdc2017/513 |url-status=live |archive-url=https://web.archive.org/web/20171201032622/https://developer.apple.com/videos/play/wwdc2017/513 |archive-date=2017-12-01 |access-date=2017-11-22 |publisher=[[Apple Inc.|Apple]] |time=0:09:26}}</ref> but will only generate ''.heic'' files.
=== AVIF: AV1 in HEIF{{Anchor|AVIF|AV1}} ===
== Support ==
{{See also|AVIF#Support}}
*[[Nokia]] provides an open source [[Java (programming language)|Java]] HEIF decoder.<ref name="Nokia">{{cite web |subject=High Efficiency Image File Format |title=HEIF Technical Information |url=https://nokiatech.github.io/heif/technical.html |url-status=live |archive-url=https://web.archive.org/web/20180201152802/http://nokiatech.github.io/heif/technical.html |archive-date=2018-02-01 |access-date=2018-02-01 |website=nokiatech.github.io |publisher=Nokia |at=Images in HEIF Files}}</ref>
* The open source library "libheif" supports reading and writing HEIF files.<ref name="libheif">{{cite web |url=https://github.com/strukturag/libheif|title=strukturag/libheif |date=May 17, 2021|via=GitHub |access-date=May 2, 2018 |archive-date=June 2, 2018 |archive-url=https://web.archive.org/web/20180602131612/https://github.com/strukturag/libheif |url-status=live }}</ref><ref>{{cite web|title=strukturag/libheif|url=https://github.com/strukturag/libheif/releases|access-date=2020-06-17|website=GitHub |archive-date=2020-06-18|archive-url=https://web.archive.org/web/20200618003355/https://github.com/strukturag/libheif/releases|url-status=live}}</ref> From version 1.8.0, both reading and writing HEIC and [[AVIF]] are supported.<ref name="libheif" />
* An image codec called CopyTrans HEIC, which is free for personal use and available for Windows versions 7 through 10, supports opening HEIF files in [[Windows Photo Viewer]] without the Microsoft codec installed. (The Microsoft HEIC codec is only available for Windows 10, version 1803 and up in the Photos [[Universal Windows Platform|UWP]] app.)<ref>{{cite web|url=https://www.copytrans.net/copytransheic/|title=Open HEIC files on Windows|website=CopyTrans.net|access-date=2018-09-27|archive-date=2018-09-16|archive-url=https://web.archive.org/web/20180916121137/https://www.copytrans.net/copytransheic/|url-status=live}}</ref>
|