refactor(watermark): auto define width

This commit is contained in:
Tomas Aparicio 2015-04-12 12:39:26 +02:00
parent 0bff93ddae
commit 4bf5d7391e
2 changed files with 3 additions and 3 deletions

View file

@ -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