HEIC: High Efficiency Image Container for Apple Ecosystem
HEIC (High Efficiency Image Container) is Apple's modern image format based on ISO Base Media File Format (ISOBMFF)—the same container used by MP4 video and HEIF. Introduced in iOS 11 (2017), HEIC has become the default for iPhone/iPad photos, replacing JPEG. HEIC achieves 40–50% smaller file sizes than JPEG at equivalent quality, with support for multiple images, depth maps, and full alpha transparency.
Critical limitation: HEIC is primarily supported by Apple devices. Windows, Android, and most web browsers require conversion to JPEG, PNG, or WebP for universal compatibility.
ISOBMFF Container Structure: Boxes
HEIC uses the same box-based structure as MP4 video:
ftyp box (file type — 'heic' brand, 'mif1' compatible)
meta box (metadata — file-level information)
hdlr box (handler — 'pict' for still image)
pitm box (primary item — which item is the primary image)
iinf box (item information — list of images, metadata)
infe boxes (item entries — image properties)
iloc box (item location — byte offsets & sizes)
iprp box (item properties — codec parameters, color profile, alpha info)
ipco box (property container)
hvcC box (HEVC config — profile, level, bit depth)
colr box (color information — color space, gamma)
pixi box (pixel information — bits per channel)
axxx box (auxiliary properties)
mdat box (media data — raw HEVC bitstream)
Minimal HEIC file (single intra-frame image):
ftyp: brand='heic', compatibility=['mif1', 'heic']
meta: primary_item_id=1
iloc: item_id=1 offset=1000 size=50000
iprp:
hvcC: profile=main_still, level=3.0, bit_depth=8
colr: color_type='nclx', primaries='sRGB'
mdat: [50000 bytes HEVC intra-frame data]
HEVC Intra-Frame Encoding for Still Images
HEIC uses intra-only HEVC—each image is encoded independently (no motion compensation):
- CTU (Coding Tree Unit): 64×64 blocks (vs. JPEG's 8×8)
- Transform: 4×32×32 DCT-like transforms (adaptive block sizes)
- Prediction: 35 directional intra modes (spatial prediction from neighboring pixels)
- Entropy coding: CABAC (Context-Adaptive Arithmetic Coding, ~30–40% better than Huffman)
- Loop filters: Deblocking + SAO (Sample Adaptive Offset) removes block artifacts
- Bit depth: 8-bit (sRGB), 10-bit, or 12-bit (HDR)
Compression comparison (100 KB JPEG target):
JPEG (Q=75): 1.2 MB → 100 KB
HEIC (CRF=28): 1.2 MB → 65 KB (35% smaller than JPEG)
WebP (CRF=20): 1.2 MB → 60 KB (similar to HEIC, but universal support)
AVIF (CRF=23): 1.2 MB → 50 KB (best compression, slowest encoding)
Alpha Channel & Auxiliary Images
Alpha plane (RGBA HEIC):
Primary image: HEVC intra-frame (YCbCr)
Alpha plane: Separate HEVC auxiliary image (monochrome)
Link via 'auxl' property indicating which image is alpha for which
Enables transparency without separate file.
Depth map (portrait mode):
Primary image: Portrait photo (HEVC intra)
Depth auxiliary: Depth value per pixel (grayscale HEVC)
Segmentation: Used for blur/focus effects in Photos app
Preserves depth information for re-editing focus later.
Metadata & Color Profile
hvcC (HEVC Configuration):
profile: 0 = Main Still Picture
level: 30 = level 3.0 (max 177,280 pixels/sec)
bit_depth: 0 = 8-bit, 1 = 10-bit, 2 = 12-bit
video_info: monochrome flag, chroma format, interlace flag
colr (Color Information):
color_type: 'nclx' (non-primary coded, for sRGB/Adobe RGB)
'rICC' (restricted ICC profile)
'prof' (unrestricted ICC profile)
primaries: 1 = BT.709 (sRGB), 9 = BT.2020 (DCI/cinema)
transfer: 1 = BT.709, 2 = unspecified, 14 = BT.2020-10bit
matrix: 1 = BT.709, 9 = BT.2020 constant luminance
File Size: HEIC vs. JPEG vs. WebP
| Image Type | JPEG | HEIC | WebP | AVIF |
|---|---|---|---|---|
| Photo (1920×1080) | 400 KB | 260 KB | 240 KB | 200 KB |
| Screenshot (1080×1920) | 350 KB | 180 KB | 150 KB | 140 KB |
| Graphic (256×256) | 80 KB | 45 KB | 35 KB | 32 KB |
| Typical iPhone photo | 3 MB JPEG | 1.8 MB HEIC | 1.5 MB WebP | 1.2 MB AVIF |
iPhone storage impact: HEIC saves ~40–50% storage vs. original JPEG source.
Browser & Device Support
| Platform | HEIC | HEIF | Conversion Path |
|---|---|---|---|
| iPhone/iPad | ✅ Native | ✅ Native | None needed |
| macOS | ✅ Preview, Photos | ✅ Photos app | None needed |
| Windows | ❌ (requires app) | ❌ (requires extension) | HEIC→JPEG via online tools |
| Android | ❌ | ❌ | None (use JPEG natively) |
| Chrome/Firefox/Edge | ❌ | ❌ | HEIC→WebP recommended |
| Safari | ✅ | ✅ | None (native) |
Web deployment: Do NOT use HEIC for web. Convert to WebP (modern) or JPEG (fallback).
Conversion: HEIC → JPEG/WebP
macOS (system tools):
# Convert HEIC to JPEG via sips
sips -s format jpeg input.heic -o output.jpg
# Batch conversion
for f in *.heic; do sips -s format jpeg "$f" -o "${f%.heic}.jpg"; done
FFmpeg:
ffmpeg -i input.heic output.jpg
ffmpeg -i input.heic -quality 85 output.jpg
ImageMagick (requires libheif):
convert input.heic output.jpg
Python (Pillow with pillow-heif):
pip install pillow-heif
from PIL import Image
from pillow_heif import register_heif_opener
register_heif_opener()
img = Image.open('input.heic')
img.save('output.jpg', 'JPEG', quality=85)
Online tools (no software needed):
- CloudConvert, Online-Convert, Zamzar (free, handles HEIC→JPEG/PNG/WebP)
HEIC vs. Alternatives
| Format | Compression | Universal | Transparency | Profile | Ecosystem |
|---|---|---|---|---|---|
| HEIC | ~40% vs JPEG | ❌ (Apple) | ✅ | Apple Photos | Apple-only |
| JPEG | Baseline | ✅ | ❌ | Broad | Universal |
| PNG | Lossless | ✅ | ✅ | Standard | Universal |
| WebP | ~30% vs JPEG | 97% browsers | ✅ | Web-native | Modern web |
| AVIF | ~50% vs JPEG | 82% browsers | ✅ | Next-gen | Emerging |
Recommendation:
- iPhone/iPad users: Use HEIC natively—Apple handles conversion when sharing
- Web publishing: Convert HEIC → WebP (modern) or JPEG (legacy fallback)
- Cross-platform sharing: Always export as JPEG to avoid compatibility headaches
- New projects: Skip HEIC entirely; use WebP for modern, JPEG for universal
HEIC is excellent for Apple ecosystem storage efficiency but remains a closed ecosystem. For interoperability, WebP is superior.
Related conversions
Common video conversions that pair well with this guide: