feat: Windows notifications, benchmarks, GPG signing, docs site, one-liner installers
This commit is contained in:
@@ -70,3 +70,22 @@ func TestDIBRejectsUnsupportedCompression(t *testing.T) {
|
||||
t.Error("expected error for unsupported compression, got nil")
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkDIBRoundTrip(b *testing.B) {
|
||||
img := image.NewRGBA(image.Rect(0, 0, 256, 256))
|
||||
var buf bytes.Buffer
|
||||
_ = png.Encode(&buf, img)
|
||||
pngData := buf.Bytes()
|
||||
|
||||
dib, err := pngToDIB(pngData)
|
||||
if err != nil {
|
||||
b.Fatalf("pngToDIB: %v", err)
|
||||
}
|
||||
|
||||
b.ResetTimer()
|
||||
for i := 0; i < b.N; i++ {
|
||||
if _, err := dibToPNG(dib); err != nil {
|
||||
b.Fatalf("dibToPNG: %v", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user