Fix the way the dpr processing option affects offsets and paddings

This commit is contained in:
DarthSim
2023-04-16 20:20:44 +03:00
parent ee0cb9feda
commit 2c28252966
14 changed files with 101 additions and 44 deletions

View File

@@ -174,7 +174,12 @@ func transformAnimated(ctx context.Context, img *vips.Image, po *options.Process
}
if watermarkEnabled && imagedata.Watermark != nil {
if err = applyWatermark(img, imagedata.Watermark, &po.Watermark, framesCount); err != nil {
dprScale, derr := img.GetDoubleDefault("imgproxy-dpr-scale", 1.0)
if derr != nil {
dprScale = 1.0
}
if err = applyWatermark(img, imagedata.Watermark, &po.Watermark, dprScale, framesCount); err != nil {
return err
}
}