diff options
author | Hubert Chathi <hubert@uhoreg.ca> | 2019-09-04 19:12:29 -0400 |
---|---|---|
committer | Hubert Chathi <hubert@uhoreg.ca> | 2019-09-04 19:12:29 -0400 |
commit | faf72a4c403000f7815d171feb8bf1a83b353584 (patch) | |
tree | d150b317ef4d0cf2245b664a37e51d76c0870352 /synapse/rest/media/v1/thumbnailer.py | |
parent | Merge branch 'uhoreg/e2e_cross-signing_merged' into cross-signing_keys (diff) | |
parent | Remove bind_email and bind_msisdn (#5964) (diff) | |
download | synapse-faf72a4c403000f7815d171feb8bf1a83b353584.tar.xz |
Merge branch 'develop' into cross-signing_keys
Diffstat (limited to 'synapse/rest/media/v1/thumbnailer.py')
-rw-r--r-- | synapse/rest/media/v1/thumbnailer.py | 4 |
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. |