MCPcopy
hub / github.com/h2non/bimg / TestImageResize

Function TestImageResize

image_test.go:9–21  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func TestImageResize(t *testing.T) {
10 buf, err := initImage("test.jpg").Resize(300, 240)
11 if err != nil {
12 t.Errorf("Cannot process the image: %#v", err)
13 }
14
15 err = assertSize(buf, 300, 240)
16 if err != nil {
17 t.Error(err)
18 }
19
20 Write("testdata/test_resize_out.jpg", buf)
21}
22
23func TestImageGifResize(t *testing.T) {
24 if VipsMajorVersion >= 8 && VipsMinorVersion >= 12 {

Callers

nothing calls this directly

Calls 4

initImageFunction · 0.85
assertSizeFunction · 0.85
WriteFunction · 0.85
ResizeMethod · 0.80

Tested by

no test coverage detected