--- a/degal/image.py Sun Jun 14 23:57:50 2009 +0300
+++ b/degal/image.py Mon Jun 15 00:23:55 2009 +0300
@@ -63,6 +63,20 @@
return exif.load(self.config, self)
@lazy_load
+ def orientation (self) :
+ """
+ Loads the orientation of this image as a (mirroring, rotation) tuple, or None, if the information is not available.
+ """
+
+ if self.config.with_exif and self.exif :
+ # try and find it
+ return self.exif.get_orientation()
+
+ else :
+ # no exif data
+ return None
+
+ @lazy_load
def metadata (self) :
"""
Load and return the metadata for the image as a dictionary