Disable vips in Windows (#1767)

This commit is contained in:
InfiniteTF 2021-09-26 02:01:45 +02:00 committed by GitHub
parent b14d5c5650
commit 2f664fe826
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"os/exec"
"runtime"
"strings"
"sync"
@ -56,7 +57,8 @@ func (e *ThumbnailEncoder) GetThumbnail(img *models.Image, maxSize int) ([]byte,
return buf.Bytes(), nil
}
if e.VipsPath != "" {
// vips has issues loading files from stdin on Windows
if e.VipsPath != "" && runtime.GOOS != "windows" {
return e.getVipsThumbnail(buf, maxSize)
} else {
return e.getFFMPEGThumbnail(buf, format, maxSize, img.Path)