(t *testing.T, w, h int)
| 81 | } |
| 82 | |
| 83 | func createTestJPEG(t *testing.T, w, h int) []byte { |
| 84 | t.Helper() |
| 85 | img := image.NewRGBA(image.Rect(0, 0, w, h)) |
| 86 | for y := range h { |
| 87 | for x := range w { |
| 88 | img.Set(x, y, color.RGBA{R: 0, G: 128, B: 255, A: 255}) |
| 89 | } |
| 90 | } |
| 91 | var buf bytes.Buffer |
| 92 | require.NoError(t, jpeg.Encode(&buf, img, &jpeg.Options{Quality: 90})) |
| 93 | return buf.Bytes() |
| 94 | } |
| 95 | |
| 96 | func TestResizeImage_NoResizeNeeded(t *testing.T) { |
| 97 | t.Parallel() |
no test coverage detected