diff options
author | Joar Wandborg <git@wandborg.com> | 2012-01-25 23:05:47 +0100 |
---|---|---|
committer | Joar Wandborg <git@wandborg.com> | 2012-01-25 23:46:11 +0100 |
commit | 63bd7c04bdc11cfd6d5805005b4e421f832106bb (patch) | |
tree | 8b6d84fa6a560cb8b85646e692690571a103f340 /mediagoblin/media_types | |
parent | 6d9ce47f5c90fffdac33c32dfcb9dd5c6fa37b11 (diff) | |
download | mediagoblin-63bd7c04bdc11cfd6d5805005b4e421f832106bb.tar.lz mediagoblin-63bd7c04bdc11cfd6d5805005b4e421f832106bb.tar.xz mediagoblin-63bd7c04bdc11cfd6d5805005b4e421f832106bb.zip |
Acts on feedback from Chris
- Added EXIF tests
- Removed pdb from image processing "ifmain"
- Fixed comment typo in image processing
- Removed unused import in tools.exif
Diffstat (limited to 'mediagoblin/media_types')
-rw-r--r-- | mediagoblin/media_types/image/processing.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/mediagoblin/media_types/image/processing.py b/mediagoblin/media_types/image/processing.py index f669e1a5..78f64be0 100644 --- a/mediagoblin/media_types/image/processing.py +++ b/mediagoblin/media_types/image/processing.py @@ -58,10 +58,13 @@ def process_image(entry): # Copy the thumb to the conversion subdir, then remotely. thumb_filename = 'thumbnail' + extension thumb_filepath = create_pub_filepath(entry, thumb_filename) + tmp_thumb_filename = os.path.join( conversions_subdir, thumb_filename) + with file(tmp_thumb_filename, 'w') as thumb_file: thumb.save(thumb_file) + mgg.public_store.copy_local_to_storage( tmp_thumb_filename, thumb_filepath) @@ -69,7 +72,8 @@ def process_image(entry): # file, a `medium.jpg` files is created and later associated with the media # entry. medium = Image.open(queued_filename) - # Fox orientation + + # Fix orientation medium = exif_fix_image_orientation(medium, exif_tags) if medium.size[0] > MEDIUM_SIZE[0] or medium.size[1] > MEDIUM_SIZE[1]: @@ -77,6 +81,7 @@ def process_image(entry): medium_filename = 'medium' + extension medium_filepath = create_pub_filepath(entry, medium_filename) + tmp_medium_filename = os.path.join( conversions_subdir, medium_filename) @@ -130,8 +135,5 @@ if __name__ == '__main__': clean = clean_exif(result) useful = get_useful(clean) - import pdb - pdb.set_trace() - print pp.pprint( clean) |