Commit f850bc19 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

imlib.c: Move orientation logic inside HAVE_LIBEXIF

parent 47fb669d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -258,8 +258,8 @@ int feh_load_image(Imlib_Image * im, feh_file * file)
		return(0);
	}

	int orientation = 0;
#ifdef HAVE_LIBEXIF
	int orientation = 0;
	ExifData *exifData = exif_data_new_from_file(file->filename);
	if (exifData) {
		ExifByteOrder byteOrder = exif_data_get_byte_order(exifData);
@@ -268,7 +268,6 @@ int feh_load_image(Imlib_Image * im, feh_file * file)
			orientation = exif_get_short(exifEntry->data, byteOrder);
	}
	file->ed = exifData;
#endif

	if (orientation == 3)
		gib_imlib_image_orientate(*im, 2);
@@ -276,6 +275,7 @@ int feh_load_image(Imlib_Image * im, feh_file * file)
		gib_imlib_image_orientate(*im, 1);
	else if (orientation == 8)
		gib_imlib_image_orientate(*im, 3);
#endif

	D(("Loaded ok\n"));
	return(1);