diff options
author | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2013-04-24 15:20:32 +0200 |
---|---|---|
committer | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2013-04-24 15:20:32 +0200 |
commit | c82a8ba54fb7019f93587456b68c03d41c9edb7d (patch) | |
tree | 4d9ac5dbcbef2dd7f0b112a53ecab90158cb4dce | |
parent | cec9648c11d851baa8add4f49cdcdbc5416386a9 (diff) | |
download | mediagoblin-c82a8ba54fb7019f93587456b68c03d41c9edb7d.tar.lz mediagoblin-c82a8ba54fb7019f93587456b68c03d41c9edb7d.tar.xz mediagoblin-c82a8ba54fb7019f93587456b68c03d41c9edb7d.zip |
resize_image: Change calling style a bit.
- entry: not used, removed.
- proc_state: going to be used, added.
- size_limits: not used, removed.
-rw-r--r-- | mediagoblin/media_types/image/processing.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/mediagoblin/media_types/image/processing.py b/mediagoblin/media_types/image/processing.py index 142ec2bf..16ffcedd 100644 --- a/mediagoblin/media_types/image/processing.py +++ b/mediagoblin/media_types/image/processing.py @@ -37,13 +37,12 @@ PIL_FILTERS = { 'ANTIALIAS': Image.ANTIALIAS} -def resize_image(entry, filename, new_path, exif_tags, workdir, new_size, - size_limits=(0, 0)): +def resize_image(proc_state, filename, new_path, exif_tags, workdir, new_size): """ Store a resized version of an image and return its pathname. Arguments: - entry -- the entry for the image to resize + proc_state -- the processing state for the image to resize filename -- the filename of the original image being resized new_path -- public file path for the new resized image exif_tags -- EXIF data for the original image @@ -120,7 +119,7 @@ def process_image(proc_state): # Always create a small thumbnail thumb_filepath = create_pub_filepath( entry, name_builder.fill('{basename}.thumbnail{ext}')) - resize_image(entry, queued_filename, thumb_filepath, + resize_image(proc_state, queued_filename, thumb_filepath, exif_tags, conversions_subdir, (mgg.global_config['media:thumb']['max_width'], mgg.global_config['media:thumb']['max_height'])) @@ -136,7 +135,7 @@ def process_image(proc_state): medium_filepath = create_pub_filepath( entry, name_builder.fill('{basename}.medium{ext}')) resize_image( - entry, queued_filename, medium_filepath, + proc_state, queued_filename, medium_filepath, exif_tags, conversions_subdir, (mgg.global_config['media:medium']['max_width'], mgg.global_config['media:medium']['max_height'])) |