diff --git a/vips.h b/vips.h index c435d889..e2196834 100644 --- a/vips.h +++ b/vips.h @@ -140,6 +140,9 @@ vips_process_image(VipsImage **img, gboolean resize, double scale, gboolean crop if (crop) { if (smart) { #if VIPS_SUPPORT_SMARTCROP + if (!(tmp = vips_image_copy_memory(*img))) return 1; + swap_and_clear(img, tmp); + if (vips_smartcrop(*img, &tmp, width, height, NULL)) return 1; swap_and_clear(img, tmp); #endif