Switching non-forms back to using normal pass_to_ugettext
[mediagoblin.git] / mediagoblin / tools / exif.py
index 20227aa854d58ab886c961342d558a2764058f79..d0f9d0a6917c871b24b15c2e846f31a60ffd4398 100644 (file)
@@ -50,7 +50,10 @@ def exif_fix_image_orientation(im, exif_tags):
     Translate any EXIF orientation to raw orientation
 
     Cons:
-    - REDUCES IMAGE QUALITY by recompressing it
+    - Well, it changes the image, which means we'll recompress
+      it... not a problem if scaling it down already anyway.  We might
+      lose some quality in recompressing if it's at the same-size
+      though
 
     Pros:
     - Prevents neck pain
@@ -131,12 +134,7 @@ def _ratio_to_list(ratio):
 
 
 def get_useful(tags):
-    useful = {}
-    for key, tag in tags.items():
-        if key in USEFUL_TAGS:
-            useful[key] = tag
-
-    return useful
+    return dict((key, tag) for (key, tag) in tags.iteritems() if key in USEFUL_TAGS)
 
 
 def get_gps_data(tags):