mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-04-23 11:11:51 -07:00
refactor(watermark): auto define width
This commit is contained in:
parent
0bff93ddae
commit
4bf5d7391e
2 changed files with 3 additions and 3 deletions
|
|
@ -208,7 +208,7 @@ func watermakImage(image *C.struct__VipsImage, w Watermark) (*C.struct__VipsImag
|
|||
w.Font = "sans 10"
|
||||
}
|
||||
if w.Width == 0 {
|
||||
w.Width = int(math.Floor(float64(image.Xsize / 8)))
|
||||
w.Width = int(math.Floor(float64(image.Xsize / 6)))
|
||||
}
|
||||
if w.DPI == 0 {
|
||||
w.DPI = 150
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue