Heifer is a HEIF/HEIC decoder and encoder written in safe Rust and compiled to WebAssembly. Drop a HEIC to view it, or a PNG or JPEG to convert it to HEIC. Your image never leaves your device.
Loading the decoder…
A from-scratch H.265 intra decoder: 8–12 bit, 4:0:0 to 4:4:4, Range Extensions.
iPhone photos are grids of up to 48 tiles, Samsung's 200 MP files have 768. Natively, they are decoded in parallel.
A from-scratch H.265 intra encoder with rate-distortion decisions, alpha, and 512×512 tiles like iPhone photos.
Metadata is read without decoding pixels. Rotation, crop and mirror are applied for you.
#![forbid(unsafe_code)], size limits, and continuous fuzzing on CI.
# Cargo.toml heifer = "0.3" let bytes = std::fs::read("photo.heic")?; let image = heifer::decode(&bytes)?; // rotation, crop and alpha applied let rgba = image.to_rgba8(); let heic = heifer::encode(&image, &heifer::EncodeOptions::default())?; std::fs::write("copy.heic", heic)?;