HEIF (.heic, .heif)
- Import supports the HEIF as well as Exif 2.3 metadata standards.
Background & Context

-
- MIME type: image/heic, image/heif, image/heic-sequence, image/heif-sequence
- HEIF raster image and compression format.
- Commonly used for storing still or animated images.
- HEIF is an acronym for High Efficiency Image File Format.
- Binary format.
- Supports grayscale and RGB color spaces.
- Supports up to 16 bits per color channel.
- Uses a lossy compression based on discrete cosine transform with varied block sizes.
- Supports different compression levels.
- Developed by Moving Picture Experts Group (MPEG).
- Published as international standard ISO/IEC 23008-12.
Import

- Import["file.heic"] imports an HEIF file, returning an image.
- Import["file.heic",elem] imports the specified element from an HEIF file.
- The import format can be specified with Import["file","HEIF"] or Import["file",{"HEIF",elem,…}].
- On Windows, the HEVC codec should be manually installed, which will still provide more limited import capabilities compared to macOS.
- On Windows, the HEVC codec should be manually installed. Import is limited to the capabilities provided by the operating system.
- See the reference pages for full general information on Import.
- ImportString supports the HEIF format.
Import Elements




- General Import elements:
-
"Elements" list of elements and options available in this file "Rules" full list of rules for each element and option "Options" list of rules for options, properties and settings - Data representation elements:
-
"AnimatedImage" animated HEIF represented as an AnimatedImage object "Data" array of pixel values "EmbeddedThumbnail" embedded thumbnail "Graphics" raster image, given as a Graphics object "Image" raster image, given as an Image object "Thumbnail" small thumbnail version of the image {"Thumbnail",size} thumbnail using the specified size - For multiframe HEIF files, the following elements can access different frames and their properties:
-
"EmbeddedThumbnailList" a list of embedded thumbnails "GraphicsList" a list of graphics "ImageCount" number of stored frames "ImageList" a list of images "ThumbnailList" a list of thumbnail images - Depth data elements:
-
"DepthImage" depth image associated to the first frame "DepthImageFullSize" depth image resized to the image dimensions - On windows, multiframe HEIF files are always imported as a single frame image and no depth information can be imported.
- Import by default uses the "Image" element for the HEIF format.
- Advanced Import elements:
-
"BitDepth" bits used to represent each color channel in the file "CameraTopOrientation" orientation of the camera when the picture was taken "Channels" - the number of color channels used in the file
"ColorProfileData" embedded color profile, given as a ColorProfileData object "ColorSpace" color encoding used in the file "EmbeddedThumbnailSize" size of the embedded thumbnail "FlashUsed" - whether the flash was fired
"GeoPosition" latitude and longitude represented as a GeoPosition object "GPSDateTime" - image creation date and time registered by GPS
"ImageSize" raster dimensions "RedEyeCorrection" whether a red-eye correction was performed "Summary" - summary of the file
"SummarySlideView" slide view summary of all frames - Metadata elements:
-
"Exif" formatted Exif (Exchange image file format) "MetaInformation" combination of all formatted metadata present in the file - Raw metadata, as stored in the file, can be imported using "RawExif", which is returned as an association.
- All Exif tags can be imported individually. Common tags include:
-
"ApertureValue" lens aperture "Artist" photographer or image creator "DateTime" image creation date and time "ExposureTime" exposure time, given in seconds "FlashInfo" - flash information: flash fired, red-eye correction, etc.
"FNumber" F number "FocalLength" actual focal length of the lens, given in millimeters "GPSAltitude" altitude of the GPS position "GPSLatitude" latitude of the GPS position "GPSLongitude" longitude of the GPS position "Make" manufacturer of the recording equipment "Model" model name or model number of the equipment "Software" name and version of the software or firmware of the camera or image input device used to generate the image - On Windows, some metadata elements such as orientation may be missing.
Examples
open allclose allScope (4)
Import Elements (25)
Available Elements (3)
Data Representation (11)
"AnimatedImage" (1)
Import the image sequence as an AnimatedImage:
"DepthImage" (1)
"DepthImageFullSize" (1)
"Graphics" (1)
Import as a Graphics object:
"GraphicsList" (1)
Import the data as a list of Graphics objects:
"Image" (1)
"ImageList" (2)
Import the data as a list of Image objects:
Metadata (11)
"ColorSpace" (1)
Get the color encoding used on export:
Use ImageColorSpace to get the color space of an imported image:
"Exif" (3)
"ImageSize" (1)
Get the dimensions of the image stored in the file:
Using ImageDimensions on an imported image gives the same result: