1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-03-22 20:21:28 +02:00

Fix build with libvips < 8.6

This commit is contained in:
DarthSim 2020-02-27 18:40:54 +06:00
parent 8ed83e973e
commit 5d3b8f19fc
2 changed files with 9 additions and 0 deletions

View File

@ -4,6 +4,7 @@
### Fixed
- Fix loadind BMP stored in ICO.
- Fix ambiguous HEIC magic bytes (MP4 videos has been detected as HEIC).
- Fix build with libvips < 8.6.
## [2.10.0] - 2020-02-13
### Added

8
vips.c
View File

@ -37,6 +37,9 @@
#define VIPS_SUPPORT_COMPOSITE \
(VIPS_MAJOR_VERSION > 8 || (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION >= 6))
#define VIPS_SUPPORT_FIND_TRIM \
(VIPS_MAJOR_VERSION > 8 || (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION >= 6))
#define EXIF_ORIENTATION "exif-ifd0-Orientation"
#if (VIPS_MAJOR_VERSION > 8 || (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION >= 8))
@ -396,6 +399,7 @@ vips_extract_area_go(VipsImage *in, VipsImage **out, int left, int top, int widt
int
vips_trim(VipsImage *in, VipsImage **out, double threshold) {
#if VIPS_SUPPORT_FIND_TRIM
VipsImage *tmp;
if (vips_image_hasalpha(in)) {
@ -434,6 +438,10 @@ vips_trim(VipsImage *in, VipsImage **out, double threshold) {
}
return vips_extract_area(in, out, left, top, width, height, NULL);
#else
vips_error("vips_trim", "Trim is not supported (libvips 8.6+ reuired)");
return 1;
#endif
}
int