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

Copy image before smart crop

This commit is contained in:
DarthSim 2017-10-17 20:03:30 +06:00
parent b8d655e1ba
commit 168efd16bb

3
vips.h
View File

@ -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