diff --git a/imglib/imglib.go b/imglib/imglib.go index dccabe4..7366376 100644 --- a/imglib/imglib.go +++ b/imglib/imglib.go @@ -918,21 +918,21 @@ func calculateStringWidth(text string, fontObj *truetype.Font, fontSize float64) // WatermarkConfig 水印配置 type WatermarkConfig struct { - SourceImage ImageInput // 源图片输入 - WatermarkImg ImageInput // 水印图片输入 - Opacity float64 // 不透明度 (0.0-1.0) - Position string // 位置: center, top-left, top-right, bottom-left, bottom-right, tile - TileSpacing int // 平铺间距 - Scale float64 // 水印缩放比例 (0.0-1.0) - Rotation float64 // 旋转角度(预留) - XOffset int // X轴偏移 - YOffset int // Y轴偏移 - Timeout int // 下载超时(秒) - OutputFormat string // 输出格式: "jpeg", "png", "auto" - JPEGQuality int // JPEG质量 (1-100) - TargetWidth int // 目标宽度 - TargetHeight int // 目标高度 - ResizeMode string // 缩放模式: "fit", "fill", "stretch" + SourceImage ImageInput // 源图片输入 + WatermarkImg ImageInput // 水印图片输入 + Opacity float64 // 不透明度 (0.0-1.0) + Position string // 位置: center, top-left, top-right, bottom-left, bottom-right, tile + TileSpacing int // 平铺间距 + Scale float64 // 水印缩放比例 (0.0-1.0) + Rotation float64 // 旋转角度(预留) + XOffset int // X轴偏移 + YOffset int // Y轴偏移 + Timeout int // 下载超时(秒) + OutputFormat string // 输出格式: "jpeg", "png", "auto" + JPEGQuality int // JPEG质量 (1-100) + TargetWidth int // 目标宽度 + TargetHeight int // 目标高度 + ResizeMode string // 缩放模式: "fit", "fill", "stretch" } // ApplyWatermark 对图片应用水印