Fix #469: Exif rotation problems
authorColin Clark <cclark@mcb.net>
Thu, 26 Jan 2017 10:28:21 +0000 (10:28 +0000)
committerColin Clark <cclark@mcb.net>
Thu, 26 Jan 2017 10:28:21 +0000 (10:28 +0000)
https://github.com/BestImageViewer/geeqie/issues/469

src/image.c

index b80908e..89750a3 100644 (file)
@@ -413,7 +413,7 @@ void image_alter_orientation(ImageWindow *imd, AlterType type)
                        break;
                }
 
-       if (imd->orientation != imd->image_fd->exif_orientation ? imd->image_fd->exif_orientation : 1)
+       if (imd->orientation != (imd->image_fd->exif_orientation ? imd->image_fd->exif_orientation : 1))
                {
                if (!options->metadata.write_orientation)
                        {
@@ -1070,6 +1070,7 @@ void image_change_pixbuf(ImageWindow *imd, GdkPixbuf *pixbuf, gdouble zoom, gboo
           here before it is taken over by the renderer. */
        if (pixbuf) g_object_ref(pixbuf);
 
+       imd->orientation = EXIF_ORIENTATION_TOP_LEFT;
        if (imd->image_fd)
                {
                if (imd->image_fd->user_orientation)