X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=mediagoblin%2Ftools%2Fexif.py;h=d0f9d0a6917c871b24b15c2e846f31a60ffd4398;hb=a789b713f534156d923cf6cc9070559ac8b6c616;hp=20227aa854d58ab886c961342d558a2764058f79;hpb=f2da5bef9a9031c8bacd63bf598ad13aa650208f;p=mediagoblin.git diff --git a/mediagoblin/tools/exif.py b/mediagoblin/tools/exif.py index 20227aa8..d0f9d0a6 100644 --- a/mediagoblin/tools/exif.py +++ b/mediagoblin/tools/exif.py @@ -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):