Read all pages (#308)

* Read all pages

* Bump to 0.10.6
This commit is contained in:
Nova Kwok 2023-12-29 21:24:56 +08:00 committed by GitHub
parent d35e0e0d0b
commit 1ec981b1fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -46,7 +46,7 @@ var (
ProxyMode bool ProxyMode bool
Prefetch bool Prefetch bool
Config = NewWebPConfig() Config = NewWebPConfig()
Version = "0.10.5" Version = "0.10.6"
WriteLock = cache.New(5*time.Minute, 10*time.Minute) WriteLock = cache.New(5*time.Minute, 10*time.Minute)
ConvertLock = cache.New(5*time.Minute, 10*time.Minute) ConvertLock = cache.New(5*time.Minute, 10*time.Minute)
RemoteRaw = "./remote-raw" RemoteRaw = "./remote-raw"

View File

@ -111,6 +111,7 @@ func convertImage(rawPath, optimizedPath, imageType string, extraParams config.E
// Image is only opened here // Image is only opened here
img, err := vips.LoadImageFromFile(rawPath, &vips.ImportParams{ img, err := vips.LoadImageFromFile(rawPath, &vips.ImportParams{
FailOnError: boolFalse, FailOnError: boolFalse,
NumPages: intMinusOne,
}) })
defer img.Close() defer img.Close()