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

View File

@@ -5,6 +5,7 @@ import (
"errors" "errors"
"fmt" "fmt"
"os/exec" "os/exec"
"runtime"
"strings" "strings"
"sync" "sync"
@@ -56,7 +57,8 @@ func (e *ThumbnailEncoder) GetThumbnail(img *models.Image, maxSize int) ([]byte,
return buf.Bytes(), nil 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) return e.getVipsThumbnail(buf, maxSize)
} else { } else {
return e.getFFMPEGThumbnail(buf, format, maxSize, img.Path) return e.getFFMPEGThumbnail(buf, format, maxSize, img.Path)