generate animated thumbnails for animated gifs

This commit is contained in:
David Christofas
2022-03-04 19:13:48 +01:00
parent 0849563810
commit d6182a4ea1
11 changed files with 223 additions and 79 deletions
+2 -2
View File
@@ -33,14 +33,14 @@ func BenchmarkGet(b *testing.B) {
res, _ := ParseResolution("32x32")
req := Request{
Resolution: res,
Checksum: "1872ade88f3013edeb33decd74a4f947",
Checksum: "1872ade88f3013edeb33decd74a4f947",
}
cwd, _ := os.Getwd()
p := filepath.Join(cwd, "../../testdata/oc.png")
f, _ := os.Open(p)
defer f.Close()
img, ext, _ := image.Decode(f)
req.Encoder = EncoderForType(ext)
req.Encoder, _ = EncoderForType(ext)
for i := 0; i < b.N; i++ {
_, _ = sut.Generate(req, img)
}