Nymiro 1a40cc236d feat: Implement HEIC/HEIF parsing and rebuilding utilities
- Add `heic_types.py` to define structures for HEIC/HEIF boxes including ItemLocationBox, ItemInfoEntryBox, and others.
- Introduce parsing logic in `parser.py` to handle various box types and their contents, including nested structures.
- Implement rebuilding functionality for ItemLocationBox to adjust offsets based on new metadata.
- Enhance ItemInfoBox to correctly parse and build content for ItemInfoEntry.
- Update `pyproject.toml` to include project metadata and dependencies.
2025-10-20 22:19:40 +13:00
2025-10-20 11:44:49 +13:00
2025-10-20 20:14:58 +13:00
2025-10-20 20:14:58 +13:00

pyheic-struct

Utilities for inspecting, modifying, and rebuilding HEIC/HEIF files with a focus on cross-vendor quirks between Samsung and Apple motion photos.

Features

  • Lightweight parser that exposes core ISOBMFF boxes (ftyp, meta, iloc, iinf, etc.)
  • Helpers for reconstructing Samsung grid images into flat HEIC pictures
  • Rebuilder that writes updated metadata and payload offsets safely
  • High-level convert_samsung_motion_photo function to create Apple-compatible HEIC/MOV pairs (with optional MOV ContentIdentifier injection via exiftool)
  • CLI tool: pyheic-struct samsung.heic

Installation

pip install .

Usage

from pyheic_struct import convert_samsung_motion_photo

convert_samsung_motion_photo("samsung.heic")

Command line:

pyheic-struct samsung.heic --output-heic samsung_fixed.HEIC

Development

The package targets Python 3.10+. Run the CLI in editable mode:

python -m pyheic_struct path/to/samsung.heic
S
Description
No description provided
Readme 53 MiB
Languages
Python 100%