refactor(vips): define constant

master
Tomas Aparicio 10 years ago
parent b7eaa00f10
commit c22442428c

@ -22,6 +22,8 @@
#define VIPS_ANGLE_D270 VIPS_ANGLE_270 #define VIPS_ANGLE_D270 VIPS_ANGLE_270
#endif #endif
#define EXIF_IFD0_ORIENTATION "exif-ifd0-Orientation"
enum types { enum types {
UNKNOWN = 0, UNKNOWN = 0,
JPEG, JPEG,
@ -135,8 +137,8 @@ vips_exif_orientation(VipsImage *image) {
int orientation = 0; int orientation = 0;
const char *exif; const char *exif;
if ( if (
vips_image_get_typeof(image, "exif-ifd0-Orientation") != 0 && vips_image_get_typeof(image, EXIF_IFD0_ORIENTATION) != 0 &&
!vips_image_get_string(image, "exif-ifd0-Orientation", &exif) !vips_image_get_string(image, EXIF_IFD0_ORIENTATION, &exif)
) { ) {
orientation = atoi(&exif[0]); orientation = atoi(&exif[0]);
} }

Loading…
Cancel
Save