From 3ac37408f28529eb152217552670d90a5088714c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@gmail.com>
Date: Tue, 12 Jan 2016 09:48:00 +0800
Subject: [PATCH] Specify the format when save the resized image

---
 mediagoblin/media_types/image/processing.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mediagoblin/media_types/image/processing.py b/mediagoblin/media_types/image/processing.py
index 951a720..9354650 100644
--- a/mediagoblin/media_types/image/processing.py
+++ b/mediagoblin/media_types/image/processing.py
@@ -78,7 +78,7 @@ def resize_image(entry, resized, keyname, target_name, new_size,
     # Copy the new file to the conversion subdir, then remotely.
     tmp_resized_filename = os.path.join(workdir, target_name)
     with open(tmp_resized_filename, 'wb') as resized_file:
-        resized.save(resized_file, quality=quality)
+        resized.save(resized_file, format=resized.format, quality=quality)
     store_public(entry, keyname, tmp_resized_filename, target_name)
 
     # store the thumb/medium info
-- 
2.5.0

