1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-11-29 23:07:40 +02:00
Files
imgproxy/processing/copy_and_check_timeout.go
2021-05-07 17:10:21 +06:00

15 lines
268 B
Go

package processing
import (
"context"
"github.com/imgproxy/imgproxy/v2/router"
"github.com/imgproxy/imgproxy/v2/vips"
)
func copyMemoryAndCheckTimeout(ctx context.Context, img *vips.Image) error {
err := img.CopyMemory()
router.CheckTimeout(ctx)
return err
}