mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-15 10:25:55 -07:00
Adding basic smartcrop support.
Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
This commit is contained in:
parent
24d84e6d8c
commit
9c914467b3
7 changed files with 58 additions and 3 deletions
13
vips.h
13
vips.h
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue