matrix-org / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://matrix-org.github.io/synapse
Apache License 2.0
11.83k stars 2.12k forks source link

Broken thumbnail for animated gif #1370

Closed matrixbot closed 2 years ago

matrixbot commented 9 years ago

Submitted by @​matthew:matrix.org

(Imported from https://matrix.org/jira/browse/SYN-476)

richvdh commented 5 years ago

Links:

Original image: https://matrix.org/_matrix/media/v1/download/matrix.org/lrSXiXxkpJiUPiysjomfVerj Broken thumbnail: https://matrix.org/_matrix/media/v1/thumbnail/matrix.org/lrSXiXxkpJiUPiysjomfVerj?width=320&height=240

richvdh commented 5 years ago

I don't know, but when I upload the same gif again, I get this exception:

  File "/opt/synapse/synapse/synapse/rest/media/v1/thumbnailer.py", line 116, in crop
    scaled_image = self.image.resize((scaled_width, height), Image.ANTIALIAS)
  File "/opt/synapse/env3/lib/python3.5/site-packages/PIL/Image.py", line 1763, in resize
    self.load()
  File "/opt/synapse/env3/lib/python3.5/site-packages/PIL/ImageFile.py", line 211, in load
    decoder.setimage(self.im, extents)
ValueError: tile cannot extend outside image

(which probably means the gif is broken somehow?)

DMRobertson commented 2 years ago

Reuploading the image from Rich's first link works and I get a thumbnail.

See

Closing as cannot reproduce.