summary refs log tree commit diff
path: root/synapse/rest/media/v1/thumbnailer.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-09-04 13:13:30 +0100
committerErik Johnston <erik@matrix.org>2019-09-04 13:13:30 +0100
commite80a5b7492d13e8b24a8c989ca25ad379dd9cf44 (patch)
treef16072be557cebe1bc386cb2f66ce15a7b002fbe /synapse/rest/media/v1/thumbnailer.py
parentMerge remote-tracking branch 'origin/develop' into matrix-org-hotfixes (diff)
parentFix and refactor room and user stats (#5971) (diff)
downloadsynapse-e80a5b7492d13e8b24a8c989ca25ad379dd9cf44.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
Diffstat (limited to 'synapse/rest/media/v1/thumbnailer.py')
-rw-r--r--synapse/rest/media/v1/thumbnailer.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/rest/media/v1/thumbnailer.py b/synapse/rest/media/v1/thumbnailer.py

index 90d8e6bffe..c995d7e043 100644 --- a/synapse/rest/media/v1/thumbnailer.py +++ b/synapse/rest/media/v1/thumbnailer.py
@@ -78,9 +78,9 @@ class Thumbnailer(object): """ if max_width * self.height < max_height * self.width: - return (max_width, (max_width * self.height) // self.width) + return max_width, (max_width * self.height) // self.width else: - return ((max_height * self.width) // self.height, max_height) + return (max_height * self.width) // self.height, max_height def scale(self, width, height, output_type): """Rescales the image to the given dimensions.