mirror of https://mirror.trustie.net/root/bimg.git
vips.h: fail to build on Debian Jessie
Debian Jessie has libvips 7.40.6. Problem is that before 7.41, VIPS_ANGLE_DXX did not exists. So we need to define properly the macro in order to build for libvips < 7.41
This commit is contained in:
parent
b78fe09f17
commit
ae4046b5a5
12
vips.h
12
vips.h
|
@ -64,6 +64,18 @@ vips_shrink_bridge(VipsImage *in, VipsImage **out, double xshrink, double yshrin
|
|||
int
|
||||
vips_rotate(VipsImage *in, VipsImage **out, int angle)
|
||||
{
|
||||
#if (VIPS_MAJOR_VERSION == 7 && VIPS_MINOR_VERSION < 41)
|
||||
/*
|
||||
* Starting libvips 7.41, VIPS_ANGLE_x has been renamed to VIPS_ANGLE_Dx
|
||||
* "to help python". So we provide the macro to correctly build for versions
|
||||
* before 7.41.x.
|
||||
* https://github.com/jcupitt/libvips/blob/master/ChangeLog#L128
|
||||
*/
|
||||
# define VIPS_ANGLE_D0 VIPS_ANGLE_0
|
||||
# define VIPS_ANGLE_D90 VIPS_ANGLE_90
|
||||
# define VIPS_ANGLE_D180 VIPS_ANGLE_180
|
||||
# define VIPS_ANGLE_D270 VIPS_ANGLE_270
|
||||
#endif
|
||||
int rotate = VIPS_ANGLE_D0;
|
||||
|
||||
if (angle == 90) {
|
||||
|
|
Loading…
Reference in New Issue