diff --git a/src/thumb.c b/src/thumb.c index 495f35351..05c64a937 100644 --- a/src/thumb.c +++ b/src/thumb.c @@ -171,12 +171,15 @@ static void thumb_loader_done_cb(ImageLoader *il, gpointer data) if (exif && exif_get_integer(exif, "Exif.Image.Orientation", &orientation)) tl->fd->exif_orientation = orientation; else - tl->fd->exif_orientation = 1; + tl->fd->exif_orientation = EXIF_ORIENTATION_TOP_LEFT; exif_free(exif); } - rotated = pixbuf_apply_orientation(pixbuf, tl->fd->exif_orientation); - pixbuf = rotated; + if (tl->fd->exif_orientation != EXIF_ORIENTATION_TOP_LEFT) + { + rotated = pixbuf_apply_orientation(pixbuf, tl->fd->exif_orientation); + pixbuf = rotated; + } } pw = gdk_pixbuf_get_width(pixbuf); diff --git a/src/thumb_standard.c b/src/thumb_standard.c index e96fbd963..5dbc42106 100644 --- a/src/thumb_standard.c +++ b/src/thumb_standard.c @@ -413,12 +413,15 @@ static GdkPixbuf *thumb_loader_std_finish(ThumbLoaderStd *tl, GdkPixbuf *pixbuf, if (exif && exif_get_integer(exif, "Exif.Image.Orientation", &orientation)) tl->fd->exif_orientation = orientation; else - tl->fd->exif_orientation = 1; + tl->fd->exif_orientation = EXIF_ORIENTATION_TOP_LEFT; exif_free(exif); } - rotated = pixbuf_apply_orientation(pixbuf, tl->fd->exif_orientation); - pixbuf = rotated; + if (tl->fd->exif_orientation != EXIF_ORIENTATION_TOP_LEFT) + { + rotated = pixbuf_apply_orientation(pixbuf, tl->fd->exif_orientation); + pixbuf = rotated; + } } sw = gdk_pixbuf_get_width(pixbuf);