Skip to content

Commit

Permalink
cwebpのjpeg_likeなオプションと同じくquality設定してprocessいれる
Browse files Browse the repository at this point in the history
Signed-off-by: drumato <[email protected]>
  • Loading branch information
Drumato committed Apr 11, 2024
1 parent 325d49b commit e92b2c0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion webp.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ func convWebp(src io.Reader) (*bytes.Buffer, error) {
return nil, err
}

webpImg, err := bimg.NewImage(img).Convert(bimg.WEBP)
processed, err := bimg.NewImage(img).Process(bimg.Options{Quality: 75})
if err != nil {
return nil, err
}

webpImg, err := bimg.NewImage(processed).Convert(bimg.WEBP)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit e92b2c0

Please sign in to comment.