mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-02-12 11:46:10 +02:00
Check VIPS_META_ORIENTATION type before get
This commit is contained in:
parent
0d5d2f5ec2
commit
3696025195
6
vips.c
6
vips.c
@ -200,8 +200,10 @@ vips_get_orientation(VipsImage *image) {
|
|||||||
#ifdef VIPS_META_ORIENTATION
|
#ifdef VIPS_META_ORIENTATION
|
||||||
int orientation;
|
int orientation;
|
||||||
|
|
||||||
if (vips_image_get_int(image, VIPS_META_ORIENTATION, &orientation) == 0)
|
if (
|
||||||
return orientation;
|
vips_image_get_typeof(image, VIPS_META_ORIENTATION) == G_TYPE_INT &&
|
||||||
|
vips_image_get_int(image, VIPS_META_ORIENTATION, &orientation) == 0
|
||||||
|
) return orientation;
|
||||||
#else
|
#else
|
||||||
const char *orientation;
|
const char *orientation;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user