DOC-104 实现图片 metadata 读取 #9
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
读取图片 width/height/format/file_size。
使用 image crate,features: png, jpeg, webp, gif。
非目标:不做 OCR、不做图片文字选择、不做复杂滤镜。
验收标准:能读取 png/jpg/webp/gif 尺寸、错误文件返回明确错误、有单元测试
完成项
✅ read_image_meta(file_path) 已实现
✅ ImageMeta {width, height, format, file_size}
✅ 支持 PNG/JPEG/WebP/GIF
✅ 错误文件返回 DocumentError::ParseError
依赖
测试
待跟进
⬜ DOC-105 ReadingPosition 模型
审查修复 (2026-06-02)
image_meta::read_image_meta之前用文件扩展名作为 format 字段,现已修复为使用image::ImageReader::format()获取实际解码格式:测试
test_read_fixture_png继续通过。