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

Function TestTransparentImageConvert

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

Source from the content-addressed store, hash-verified

400}
401
402func TestTransparentImageConvert(t *testing.T) {
403 image := initImage("transparent.png")
404 options := Options{
405 Type: JPEG,
406 Background: Color{255, 255, 255},
407 }
408 buf, err := image.Process(options)
409 if err != nil {
410 t.Errorf("Cannot process the image: %#v", err)
411 }
412 Write("testdata/test_transparent_image_convert_out.jpg", buf)
413}
414
415func TestImageMetadata(t *testing.T) {
416 data, err := initImage("test.png").Metadata()

Callers

nothing calls this directly

Calls 3

initImageFunction · 0.85
WriteFunction · 0.85
ProcessMethod · 0.80

Tested by

no test coverage detected