mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-10-05 19:23:07 +02:00
Fix build with vips < 8.5.0
This commit is contained in:
14
vips.h
14
vips.h
@@ -5,6 +5,9 @@
|
||||
#define VIPS_SUPPORT_SMARTCROP \
|
||||
(VIPS_MAJOR_VERSION > 8 || (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION >= 5))
|
||||
|
||||
#define VIPS_SUPPORT_HASALPHA \
|
||||
(VIPS_MAJOR_VERSION > 8 || (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION >= 5))
|
||||
|
||||
#define VIPS_SUPPORT_GIF \
|
||||
VIPS_MAJOR_VERSION > 8 || (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION >= 3)
|
||||
|
||||
@@ -119,6 +122,17 @@ vips_band_format(VipsImage *in) {
|
||||
return in->BandFmt;
|
||||
}
|
||||
|
||||
gboolean
|
||||
vips_image_hasalpha_go(VipsImage * in) {
|
||||
#if VIPS_SUPPORT_HASALPHA
|
||||
return vips_image_hasalpha(in);
|
||||
#else
|
||||
return( image->Bands == 2 ||
|
||||
(image->Bands == 4 && image->Type != VIPS_INTERPRETATION_CMYK) ||
|
||||
image->Bands > 4 );
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
vips_premultiply_go(VipsImage *in, VipsImage **out) {
|
||||
return vips_premultiply(in, out, NULL);
|
||||
|
Reference in New Issue
Block a user