+ /* As of 10.6, NSImage rotates according to EXIF by default:
+ http://developer.apple.com/mac/library/releasenotes/cocoa/appkit.html
+ So this function should return -1 when *running* on 10.6 systems.
+ But when running against older systems, we need to examine the image
+ to figure out its rotation.
+ */
+
+# if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 /* 10.6 SDK */
+
+ /* When we have compiled against the 10.6 SDK, we know that we are
+ running on a 10.6 or later system.
+ */
+ return -1;
+
+# else /* Compiled against 10.5 SDK or earlier */
+
+ /* If this selector exists, then we are running against a 10.6 runtime
+ that does automatic EXIF rotation (despite the fact that we were
+ compiled against the 10.5 or earlier SDK). So in that case, this
+ function should no-op.
+ */
+ if ([NSImage instancesRespondToSelector:
+ @selector(initWithDataIgnoringOrientation:)])
+ return -1;
+
+ /* Otherwise, go ahead and figure out what the rotational characteristics
+ of this image are. */
+
+
+