summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2016-01-07 20:07:53 +0100
committerMark Haines <mjark@negativecurvature.net>2016-01-07 20:07:53 +0100
commit7c816de4427149876c4881c8d9ef6a66a0557bfe (patch)
tree7ee2265bdd24d436f9f3c6884f0281c9b7f61cdf /synapse/rest
parentUse logger not logging (diff)
parentOnly use cropped thumbnails when asked for a cropped thumbnail. (diff)
downloadsynapse-7c816de4427149876c4881c8d9ef6a66a0557bfe.tar.xz
Merge pull request #475 from matrix-org/markjh/fix_thumbnail
Only use cropped thumbnails when asked for a cropped thumbnail.
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/media/v1/thumbnail_resource.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/rest/media/v1/thumbnail_resource.py b/synapse/rest/media/v1/thumbnail_resource.py
index c18160534e..ab52499785 100644
--- a/synapse/rest/media/v1/thumbnail_resource.py
+++ b/synapse/rest/media/v1/thumbnail_resource.py
@@ -253,7 +253,7 @@ class ThumbnailResource(BaseMediaResource):
                 t_w = info["thumbnail_width"]
                 t_h = info["thumbnail_height"]
                 t_method = info["thumbnail_method"]
-                if t_method == "scale" or t_method == "crop":
+                if t_method == "crop":
                     aspect_quality = abs(d_w * t_h - d_h * t_w)
                     min_quality = 0 if d_w <= t_w and d_h <= t_h else 1
                     size_quality = abs((d_w - t_w) * (d_h - t_h))