Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for BenchmarkEncodeNRGBA (0.13 sec)

  1. src/image/png/writer_test.go

    		b.Fatal("expected image to be opaque")
    	}
    	b.SetBytes(640 * 480 * 4)
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		Encode(io.Discard, img)
    	}
    }
    
    func BenchmarkEncodeNRGBA(b *testing.B) {
    	img := image.NewNRGBA(image.Rect(0, 0, 640, 480))
    	if img.Opaque() {
    		b.Fatal("expected image not to be opaque")
    	}
    	b.SetBytes(640 * 480 * 4)
    	b.ReportAllocs()
    	b.ResetTimer()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 14 08:14:05 UTC 2022
    - 8.9K bytes
    - Viewed (0)
Back to top