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
|
b
|
def resize_image(entry, resized, keyname, target_name, new_size,
|
78 | 78 | # Copy the new file to the conversion subdir, then remotely. |
79 | 79 | tmp_resized_filename = os.path.join(workdir, target_name) |
80 | 80 | with open(tmp_resized_filename, 'wb') as resized_file: |
81 | | resized.save(resized_file, quality=quality) |
| 81 | resized.save(resized_file, format=resized.format, quality=quality) |
82 | 82 | store_public(entry, keyname, tmp_resized_filename, target_name) |
83 | 83 | |
84 | 84 | # store the thumb/medium info |