diff src/image.c @ 439:1cca0b614cba

Add a way to restore original state in Adjust menu.
author zas_
date Sun, 20 Apr 2008 09:47:51 +0000
parents f707aa712b1f
children 4b2d7f9af171
line wrap: on
line diff
--- a/src/image.c	Sun Apr 20 09:29:46 2008 +0000
+++ b/src/image.c	Sun Apr 20 09:47:51 2008 +0000
@@ -583,6 +583,9 @@
 			imd->desaturate = !imd->desaturate;
 			break;
 		case ALTER_NONE:
+			imd->orientation = imd->image_fd->exif_orientation ? imd->image_fd->exif_orientation : 1;
+			imd->desaturate = FALSE;
+			break;
 		default:
 			return;
 			break;
@@ -1316,10 +1319,11 @@
 		
 		if (exif && read_exif_for_orientation)
 			{
-			if (exif_get_integer(exif, "Exif.Image.Orientation", &orientation)) 
+			if (exif_get_integer(exif, "Exif.Image.Orientation", &orientation))
 				imd->orientation = orientation;
 			else
 				imd->orientation = 1;
+			imd->image_fd->exif_orientation = imd->orientation;
 			}
 		}