diff --git a/image_test.go b/image_test.go index edb46ee..29e3bd4 100644 --- a/image_test.go +++ b/image_test.go @@ -168,7 +168,7 @@ func TestImageWatermarkNoReplicate(t *testing.T) { func TestImageZoom(t *testing.T) { image := initImage("test.jpg") - _, err := image.Extract(100, 100, 0, 0) + _, err := image.Extract(100, 100, 400, 300) if err != nil { t.Errorf("Cannot extract the image: %s", err) } @@ -180,7 +180,7 @@ func TestImageZoom(t *testing.T) { err = assertSize(buf, 800, 600) if err != nil { - //t.Error(err) + t.Error(err) } Write("fixtures/test_zoom_out.jpg", buf) diff --git a/resize.go b/resize.go index 0de04ae..253c626 100644 --- a/resize.go +++ b/resize.go @@ -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