diff options
author | Mark Haines <mark.haines@matrix.org> | 2016-01-07 18:57:15 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2016-01-07 18:57:15 +0000 |
commit | 8677b7d698bf3d3b82e2bcfa783e3b55aa4246e2 (patch) | |
tree | 7ee2265bdd24d436f9f3c6884f0281c9b7f61cdf /synapse/rest/media | |
parent | Use logger not logging (diff) | |
download | synapse-8677b7d698bf3d3b82e2bcfa783e3b55aa4246e2.tar.xz |
Only use cropped thumbnails when asked for a cropped thumbnail.
Even though ones cropped with scale might be technically valid.
Diffstat (limited to 'synapse/rest/media')
-rw-r--r-- | synapse/rest/media/v1/thumbnail_resource.py | 2 |
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)) |