mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-06 02:58:52 -04:00
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
This commit is contained in:
commit
8a6196c6c8
5 changed files with 84 additions and 51 deletions
|
@ -240,6 +240,9 @@ class MediaRepository(object):
|
|||
if t_method == "crop":
|
||||
t_len = thumbnailer.crop(t_path, t_width, t_height, t_type)
|
||||
elif t_method == "scale":
|
||||
t_width, t_height = thumbnailer.aspect(t_width, t_height)
|
||||
t_width = min(m_width, t_width)
|
||||
t_height = min(m_height, t_height)
|
||||
t_len = thumbnailer.scale(t_path, t_width, t_height, t_type)
|
||||
else:
|
||||
t_len = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue