You've already forked imgproxy
mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-12-05 23:28:10 +02:00
Watermarking with vips_composite
This commit is contained in:
10
process.go
10
process.go
@@ -229,16 +229,10 @@ func prepareWatermark(wm *vipsImage, wmData *watermarkData, opts *watermarkOptio
|
||||
}
|
||||
|
||||
if opts.Replicate {
|
||||
if err := wm.Replicate(imgWidth, imgHeight); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
if err := wm.Embed(opts.Gravity, imgWidth, imgHeight, opts.OffsetX, opts.OffsetY, rgbColor{0, 0, 0}); err != nil {
|
||||
return err
|
||||
}
|
||||
return wm.Replicate(imgWidth, imgHeight)
|
||||
}
|
||||
|
||||
return wm.CopyMemory()
|
||||
return wm.Embed(opts.Gravity, imgWidth, imgHeight, opts.OffsetX, opts.OffsetY, rgbColor{0, 0, 0})
|
||||
}
|
||||
|
||||
func applyWatermark(img *vipsImage, wmData *watermarkData, opts *watermarkOptions, framesCount int) error {
|
||||
|
||||
Reference in New Issue
Block a user