1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-01-08 10:45:04 +02:00
imgproxy/processing/copy_and_check_timeout.go

15 lines
268 B
Go
Raw Normal View History

2021-04-26 13:52:50 +02:00
package processing
import (
"context"
2021-09-30 16:23:30 +02:00
"github.com/imgproxy/imgproxy/v3/router"
"github.com/imgproxy/imgproxy/v3/vips"
2021-04-26 13:52:50 +02:00
)
func copyMemoryAndCheckTimeout(ctx context.Context, img *vips.Image) error {
err := img.CopyMemory()
router.CheckTimeout(ctx)
return err
}