You've already forked FrameTour-BE
feat(image): 启用边缘端水印处理并优化徕卡模板布局算法
- 将边缘端处理默认启用状态从false改为true - 将边缘端处理超时时间从30秒调整为10秒 - 将徕卡水印模板的固定像素配置转换为基于1920x1080的百分比配置 - 新增多种百分比常量包括底部区域、Logo大小、边距、字体大小等 - 实现动态计算实际像素值的方法替代固定数值 - 在PrinterServiceImpl中注入WatermarkEdgeService依赖 - 配置水印处理流程启用边缘服务和存储适配器
This commit is contained in:
@@ -60,11 +60,11 @@ public class WatermarkConfig {
|
||||
* 是否启用边缘端处理
|
||||
*/
|
||||
@Builder.Default
|
||||
private final boolean edgeEnabled = false;
|
||||
private final boolean edgeEnabled = true;
|
||||
|
||||
/**
|
||||
* 边缘端处理超时时间(毫秒)
|
||||
*/
|
||||
@Builder.Default
|
||||
private final long edgeTimeoutMs = 30000L;
|
||||
private final long edgeTimeoutMs = 10_000L;
|
||||
}
|
||||
|
||||
@@ -190,8 +190,8 @@ public class WatermarkStage extends AbstractPipelineStage<PhotoProcessContext> {
|
||||
// 构建水印信息用于边缘端处理
|
||||
WatermarkInfo info = buildWatermarkInfo(context, currentFile, watermarkedFile, type);
|
||||
|
||||
// 调用边缘端服务处理
|
||||
return edgeService.processWatermarkFromFile(info, type, storageAdapter);
|
||||
// 调用边缘端服务处理,传递 processId 作为 recordId
|
||||
return edgeService.processWatermarkFromFile(info, type, storageAdapter, context.getProcessId());
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("边缘端水印处理异常: type={}, error={}", type.getType(), e.getMessage(), e);
|
||||
|
||||
Reference in New Issue
Block a user