feat(thumb): use ffmpeg to generate thumb

This commit is contained in:
Aaron Liu
2023-04-07 19:30:41 +08:00
parent b55344459d
commit 98b86b37de
6 changed files with 112 additions and 8 deletions

View File

@@ -157,7 +157,7 @@ func (image *Thumb) CreateAvatar(uid uint) error {
type Builtin struct{}
func (b Builtin) Generate(ctx context.Context, file io.Reader, name string, options map[string]string) (string, error) {
func (b Builtin) Generate(ctx context.Context, file io.Reader, src, name string, options map[string]string) (string, error) {
img, err := NewThumbFromFile(file, name)
if err != nil {
return "", err