Skip to content
Permalink
Browse files

Check VIPS_META_ORIENTATION type before get

  • Loading branch information...
DarthSim committed Oct 11, 2019
1 parent 0d5d2f5 commit 3696025195c6558b81b12381c18d2e16474d16f1
Showing with 4 additions and 2 deletions.
  1. +4 −2 vips.c
6 vips.c
@@ -200,8 +200,10 @@ vips_get_orientation(VipsImage *image) {
#ifdef VIPS_META_ORIENTATION
int orientation;

if (vips_image_get_int(image, VIPS_META_ORIENTATION, &orientation) == 0)
return orientation;
if (
vips_image_get_typeof(image, VIPS_META_ORIENTATION) == G_TYPE_INT &&
vips_image_get_int(image, VIPS_META_ORIENTATION, &orientation) == 0
) return orientation;
#else
const char *orientation;

0 comments on commit 3696025

Please sign in to comment.
You can’t perform that action at this time.