matrix-org / dendrite

Dendrite is a second-generation Matrix homeserver written in Go!
https://matrix-org.github.io/dendrite/
Apache License 2.0
5.75k stars 676 forks source link

Sticker Thumbnail Preview Transparency Issue #1815

Open viasux opened 3 years ago

viasux commented 3 years ago

Background information

Description

Stickers sometimes have a non-transparent background (using https://github.com/maunium/stickerpicker) I asked the stickerpicker dev about it and they told me it was most likely dendrite.

Steps to reproduce

What is expected is that the background would be transparent. 2021-04-03_03-18

ShadowJonathan commented 3 years ago

(Maybe it would help to add the MXC URLs to those three stickers there, to be able to inspect them)

viasux commented 3 years ago

(Maybe it would help to add the MXC URLs to those three stickers there, to be able to inspect them)

MXC? Do you mean the link to the image file?

https://matrix-client.matrix.org/_matrix/media/r0/thumbnail/matrix.org/XBvLmfZMDqSnlnTzwBbhaGic?height=128&width=128&method=scale https://matrix-client.matrix.org/_matrix/media/r0/thumbnail/matrix.org/whhVHLOuOALIArEMLxmtsbib?height=128&width=128&method=scale https://matrix-client.matrix.org/_matrix/media/r0/thumbnail/matrix.org/jQGjxWzTIfhqVBpPBQKjOLcd?height=128&width=128&method=scale

ShadowJonathan commented 3 years ago

Yes, i'll thumbnail these via dendrite.matrix.org, since it seems to have the same issue. Curiously enough, these images also dont scale properly (as is instructed via the query parameter)

DMO Images `mxc://matrix.org/XBvLmfZMDqSnlnTzwBbhaGic` ![](https://dendrite.matrix.org/_matrix/media/r0/thumbnail/matrix.org/XBvLmfZMDqSnlnTzwBbhaGic?height=128&width=128&method=scale) `mxc://matrix.org/jQGjxWzTIfhqVBpPBQKjOLcd` ![](https://dendrite.matrix.org/_matrix/media/r0/thumbnail/matrix.org/jQGjxWzTIfhqVBpPBQKjOLcd?height=128&width=128&method=scale) `mxc://matrix.org/whhVHLOuOALIArEMLxmtsbib` ![](https://dendrite.matrix.org/_matrix/media/r0/thumbnail/matrix.org/whhVHLOuOALIArEMLxmtsbib?height=128&width=128&method=scale) `mxc://matrix.org/MuqbQlrpCcbBCXvEstjzpwVv` (the "growl" one from above) ![](https://dendrite.matrix.org/_matrix/media/r0/thumbnail/matrix.org/MuqbQlrpCcbBCXvEstjzpwVv?height=128&width=128&method=scale)

identify and file dont find anything weird with these.

jboi.nl (a synapse server, my own) seems to find no issue with these:

Synapse Images `mxc://matrix.org/XBvLmfZMDqSnlnTzwBbhaGic` ![](https://matrix.jboi.nl/_matrix/media/r0/thumbnail/matrix.org/XBvLmfZMDqSnlnTzwBbhaGic?height=128&width=128&method=scale) `mxc://matrix.org/jQGjxWzTIfhqVBpPBQKjOLcd` ![](https://matrix.jboi.nl/_matrix/media/r0/thumbnail/matrix.org/jQGjxWzTIfhqVBpPBQKjOLcd?height=128&width=128&method=scale) `mxc://matrix.org/whhVHLOuOALIArEMLxmtsbib` ![](https://matrix.jboi.nl/_matrix/media/r0/thumbnail/matrix.org/whhVHLOuOALIArEMLxmtsbib?height=128&width=128&method=scale) `mxc://matrix.org/MuqbQlrpCcbBCXvEstjzpwVv` (the "growl" one from above) ![](https://matrix.jboi.nl/_matrix/media/r0/thumbnail/matrix.org/MuqbQlrpCcbBCXvEstjzpwVv?height=128&width=128&method=scale)

matrix.org seems to have these wrong cached, by the way, giving a larger image than needed.

viasux commented 3 years ago

I'm planning on changing the webserver I host these on, will that cause any issues with the images you posted?

viasux commented 3 years ago

Yes, i'll thumbnail these via dendrite.matrix.org, since it seems to have the same issue. Curiously enough, these images also dont scale properly (as is instructed via the query parameter) DMO Images

identify and file dont find anything weird with these.

jboi.nl (a synapse server, my own) seems to find no issue with these: Synapse Images

matrix.org seems to have these wrong cached, by the way, giving a larger image than needed.

also those synapse images appear to be very small, I like the current size of the stickers (they aren't emojis)

ShadowJonathan commented 3 years ago

Synapse is displaying the thumbnail sizes correctly, scaling it to 128, its matrix.org that has this cached incorrectly.

I'm planning on changing the webserver I host these on, will that cause any issues with the images you posted?

I'm not referencing your server domain for privacy concerns, but unless you also change the domain (which has its own can of worms), everything should be alright.

viasux commented 3 years ago

Synapse is displaying the thumbnail sizes correctly, scaling it to 128, its matrix.org that has this cached incorrectly.

I'm planning on changing the webserver I host these on, will that cause any issues with the images you posted?

I'm not referencing your server domain for privacy concerns, but unless you also change the domain (which has its own can of worms), everything should be alright.

I am going to change the domain lol (where the stickers are hosted)

ShadowJonathan commented 3 years ago

I am going to change the domain lol (where the stickers are hosted)

That's not going to fix the problem, to dendrite, they'd be the same files, regardless if they're hosted on other servers, or the same one.

viasux commented 3 years ago

I am going to change the domain lol (where the stickers are hosted)

That's not going to fix the problem, to dendrite, they'd be the same files, regardless if they're hosted on other servers, or the same one.

Not trying to fix the issue lol

kegsay commented 3 years ago

This may be a thumbnailing issue in Dendrite, needs investigation.

ashley-graves commented 1 year ago

Having the same issue.

fabrixxm commented 1 year ago

I would say the issue is coming from here and here