refactor(errors): 重构错误处理,支持强类型匹配并剥离 base64 依赖

- 新增 Other变体以及构造函数new
- 剥离图像预处理中的 Base64 相关错误至业务层处理
- 引入强类型 `LogitsDimensionMismatch` 替代不便匹配的字符串错误
- 优化 `normalize_ocr_logits` 的转换流程,兼顾零拷贝性能与精细化报错
- 优化 全库错误处理
This commit is contained in:
2026-07-17 20:08:32 +08:00
parent 4f6987f594
commit 913ff4d884
12 changed files with 397 additions and 200 deletions

View File

@@ -1,8 +1,8 @@
pub mod image_io;
pub mod image_convert;
pub mod image_processor;
mod tensor_transform;
mod image_helper;
// 对外统一暴露干净的 API 语义层
pub use tensor_transform::normalize_ocr_logits;
pub use image_io::{ColorMode};
pub use image_convert::{ColorMode};