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:
parent
b8d655e1ba
commit
168efd16bb
3
vips.h
3
vips.h
@ -140,6 +140,9 @@ vips_process_image(VipsImage **img, gboolean resize, double scale, gboolean crop
|
|||||||
if (crop) {
|
if (crop) {
|
||||||
if (smart) {
|
if (smart) {
|
||||||
#if VIPS_SUPPORT_SMARTCROP
|
#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;
|
if (vips_smartcrop(*img, &tmp, width, height, NULL)) return 1;
|
||||||
swap_and_clear(img, tmp);
|
swap_and_clear(img, tmp);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user