element-hq / element-hq/synapse
Synapse's media repository does not preserve colourspace when thumbnailing
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
### Description
Wide gamut images get their colourspace ignored or removed when thumbnailed by Synapse, making the thumbnail look distinctly drab.
### Steps to reproduce
* Upload an image with wide gamut colour to Synapse (e.g. a JPEG in P3 colour space): https://matrix-client.matrix.org/_matrix/media/v3/download/matrix.org/qcexnobqNXHNFShayQgolvsy
* Observe that thumbnail calculated by the sending client is P3 and nice and vivid (when viewed on a wide gamut display): https://matrix-client.matrix.org/_matrix/media/v3/download/matrix.org/IqxsdtpAuPvBYfcbsyqcNTxF
* Observe that the thumbnail calculated by Synapse is drab and no longer wide gamut: https://matrix-client.matrix.org/_matrix/media/v3/thumbnail/matrix.org/qcexnobqNXHNFShayQgolvsy?width=1600&height=1200&method=scale. From a guess, it's just stripping off the colourspace to a default sRGB when thumbnailing it.
### Homeserver
matrix.org
### Synapse Version
1.101.0 (b=matrix-org-hotfixes,beff0a756e)
### Installation Method
Other (please mention below)
### Database
postgres
### Workers
Multiple workers
### Platform
Debian 10.13
### Configuration
_No response_
### Relevant log output
```shell
None
```
### Anything else that would be useful to know?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.