Adding basic smartcrop support.

Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
This commit is contained in:
Yoan Blanc 2017-04-04 10:17:01 +02:00
parent 24d84e6d8c
commit 9c914467b3
No known key found for this signature in database
GPG key ID: 6058CF4574298812
7 changed files with 58 additions and 3 deletions

13
vips.h
View file

@ -303,9 +303,7 @@ vips_webpsave_bridge(VipsImage *in, void **buf, size_t *len, int strip, int qual
int
vips_tiffsave_bridge(VipsImage *in, void **buf, size_t *len) {
#if (VIPS_MAJOR_VERSION >= 8 && VIPS_MINOR_VERSION >= 5)
return vips_tiffsave_buffer(in, buf, len,
NULL
);
return vips_tiffsave_buffer(in, buf, len, NULL);
#else
return 0;
#endif
@ -572,3 +570,12 @@ vips_watermark_image(VipsImage *in, VipsImage *sub, VipsImage **out, WatermarkIm
g_object_unref(base);
return 0;
}
int
vips_smartcrop_bridge(VipsImage *in, VipsImage **out, int width, int height) {
#if (VIPS_MAJOR_VERSION >= 8 && VIPS_MINOR_VERSION >= 5)
return vips_smartcrop(in, out, width, height, NULL);
#else
return 0;
#endif
}