mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-06-17 22:37:33 +02:00
Check timeout automatically
This commit is contained in:
@ -140,7 +140,7 @@ func transformAnimated(ctx context.Context, img *vips.Image, po *options.Process
|
||||
return err
|
||||
}
|
||||
|
||||
if err = copyMemoryAndCheckTimeout(ctx, img); err != nil {
|
||||
if err = img.CopyMemory(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -264,10 +264,6 @@ func ProcessImage(ctx context.Context, imgdata *imagedata.ImageData, po *options
|
||||
}
|
||||
}
|
||||
|
||||
if err := copyMemoryAndCheckTimeout(ctx, img); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if po.Format == imagetype.AVIF && (img.Width() < 16 || img.Height() < 16) {
|
||||
if img.HasAlpha() {
|
||||
po.Format = imagetype.PNG
|
||||
|
Reference in New Issue
Block a user