mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-10-10 12:12:40 +02:00
Add vips debug flag
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"log"
|
"log"
|
||||||
"math"
|
"math"
|
||||||
|
"os"
|
||||||
"runtime"
|
"runtime"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
)
|
)
|
||||||
@@ -91,6 +92,11 @@ func initVips() {
|
|||||||
C.vips_cache_set_max_mem(100 * 1024 * 1024) // 100Mb
|
C.vips_cache_set_max_mem(100 * 1024 * 1024) // 100Mb
|
||||||
C.vips_cache_set_max(500)
|
C.vips_cache_set_max(500)
|
||||||
|
|
||||||
|
if len(os.Getenv("IMGPROXY_DEBUG_VIPS")) > 0 {
|
||||||
|
C.vips_cache_set_dump(C.gboolean(1))
|
||||||
|
C.vips_cache_set_trace(C.gboolean(1))
|
||||||
|
}
|
||||||
|
|
||||||
vipsSupportSmartcrop = C.vips_support_smartcrop() == 1
|
vipsSupportSmartcrop = C.vips_support_smartcrop() == 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user