1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-03-17 20:17:48 +02:00

Fix smart crop + brur/sharpen SIGSEGV on Alpine

This commit is contained in:
DarthSim 2018-10-25 20:22:29 +06:00
parent d1329381f7
commit e163400864

View File

@ -324,6 +324,11 @@ func processImage(ctx context.Context) ([]byte, error) {
if err = vipsSmartCrop(&img, po.Width, po.Height); err != nil {
return nil, err
}
// Applying additional modifications after smart crop causes SIGSEGV on Alpine
// so we have to copy memory after it
if err = vipsImageCopyMemory(&img); err != nil {
return nil, err
}
} else {
left, top := calcCrop(imgWidth, imgHeight, po)
if err = vipsCrop(&img, left, top, po.Width, po.Height); err != nil {