Fix (by Rodney Ewing) for processing, specifically the way resize_tool was being...
authorChristopher Allan Webber <cwebber@dustycloud.org>
Mon, 12 Aug 2013 16:57:52 +0000 (11:57 -0500)
committerRodney Ewing <ewing.rj@gmail.com>
Fri, 16 Aug 2013 22:30:17 +0000 (15:30 -0700)
Thanks for fixing, Rodney :)

mediagoblin/media_types/image/processing.py

index 6c6c77085c53cba8678864c36624750f40a3e390..01e5cce52f59979de2999a6a33fe399bc79ca50d 100644 (file)
@@ -82,11 +82,8 @@ def resize_image(entry, resized, keyname, target_name, new_size,
 
 
 def resize_tool(entry,
-                force, keyname, target_name,
+                force, keyname, orig_file, target_name,
                 conversions_subdir, exif_tags, new_size=None):
-    # filename -- the filename of the original image being resized
-    filename = target_name
-
     # Use the default size if new_size was not given
     if not new_size:
         max_width = mgg.global_config['media:' + keyname]['max_width']
@@ -98,7 +95,7 @@ def resize_tool(entry,
     # entry.
     # Also created if the file needs rotation, or if forced.
     try:
-        im = Image.open(filename)
+        im = Image.open(orig_file)
     except IOError:
         raise BadMediaFail()
     if force \