refactor: 优化图像输入源设计,重构为零污染的 TryFromImage 特征
- 移除原有的 ImageInput 枚举,避免运行时匹配与所有权限制 - 引入自定义 TryFromImage 特征,专用于将不同来源安全转换为 ImageSource - 优化错误处理新增 InvalidBase64Header 错误信息 - 迁移 load_image_from_input 到 image_helper.rs 为后续剥离到业务层做准备
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
pub mod image_io;
|
||||
pub mod image_processor;
|
||||
mod tensor_transform;
|
||||
mod image_helper;
|
||||
|
||||
// 对外统一暴露干净的 API 语义层
|
||||
pub use tensor_transform::normalize_ocr_logits;
|
||||
pub use image_io::{ColorMode};
|
||||
|
||||
Reference in New Issue
Block a user