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.
This commit is contained in:
Nymiro
2025-10-20 22:19:40 +13:00
parent b3f0fd4ce3
commit 1a40cc236d
28 changed files with 381 additions and 241 deletions
+3 -2
View File
@@ -1,9 +1,10 @@
# pyheic_struct/inspect_heic.py
import sys
from heic_file import HEICFile
import pprint # 用于漂亮地打印字典
from pyheic_struct import HEICFile
def inspect_file(filename: str):
print(f"--- 正在侦察: {filename} ---")
@@ -107,4 +108,4 @@ if __name__ == "__main__":
print("用法: python inspect_heic.py <文件名>")
print("例如: python inspect_heic.py samsung.heic")
else:
inspect_file(sys.argv[1])
inspect_file(sys.argv[1])