1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2024-11-29 08:22:11 +02:00
imgproxy/processing/copy_and_check_timeout.go
2021-09-30 20:23:30 +06:00

15 lines
268 B
Go

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