mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
feat(thumb): use libvips to generate thumb
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package thumb
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"image"
|
||||
"image/gif"
|
||||
@@ -156,7 +157,7 @@ func (image *Thumb) CreateAvatar(uid uint) error {
|
||||
|
||||
type Builtin struct{}
|
||||
|
||||
func (b Builtin) Generate(file io.Reader, name string, options map[string]string) (string, error) {
|
||||
func (b Builtin) Generate(ctx context.Context, file io.Reader, name string, options map[string]string) (string, error) {
|
||||
img, err := NewThumbFromFile(file, name)
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
||||
Reference in New Issue
Block a user