heifer-cli
Convert HEIC/HEIF photos to and from PNG, JPEG, WebP, TIFF, BMP and GIF, from the command line. Pure Rust: no libheif, no ffmpeg, nothing to install besides the binary.
-
--format 420|422|444|losslesspicks the HEIC or.heicscoding: 4:2:0 by default, 4:2:2 (half width) or 4:4:4 for graphics and text, or lossless (4:4:4 GBR, no quantization, so 8-bit input decodes unchanged).--losslessis a shortcut, and-qhas no effect on lossless output. -
--speed fast|medium|slowselects the speed/compression preset for HEIC and.heicsoutput. -
--keyframe-interval <n>,--b-frames <n>and--fps <n>control.heicssequence GOP structure and timing (with--b-frames >= 3enabling hierarchical B-frames). -
--auxwrites every auxiliary image next to the output as PNG:photo.depth.png,photo.gain-map.png,photo.alpha.png, andphoto.aux-<id>.pngfor other refinements.--depthand--gain-mapselect one type and fail when the file has none. Depth maps, alpha planes and gain maps are written in grayscale at their coded bit depth; other refinements keep RGBA.infolists auxiliary images with their URN, size and bit depth, the depth representation information, the HDR gain map headroom when known, and reports IPTC presence. -
--frameswrites every frame of an image sequence (bursts, animations,.heics) in display order, numbered after the output name, instead of the main image. With a.gifor.apngoutput it writes one animated file instead, looping, with each frame's duration (APNG is lossless; GIF is limited to 256 colours per frame). A file that also holds a sequence gets a note when converted without it, andinfoshows its frames, duration and keyframes. -
EXIF data and ICC colour profiles are kept, and photos are written upright.
-
Existing files are never overwritten unless you pass
--force. -
Grid photos (iPhone, Samsung…) are decoded and encoded on all cores.
Part of Heifer, which also provides the
heifer library and an
in-browser converter.
HEVC is covered by patents; you are responsible for any licensing your use requires.
Licensed under MIT or Apache-2.0, at your option.