dendrite icon indicating copy to clipboard operation
dendrite copied to clipboard

Sticker Thumbnail Preview Transparency Issue

Open viasux opened this issue 4 years ago • 12 comments

Background information

  • Dendrite version or git SHA: dendrite 0.3.11-1(https://aur.archlinux.org/packages/dendrite/)
  • Monolith or Polylith?: Monolith
  • SQLite3 or Postgres?: Postgres
  • Running in Docker?: No
  • go version: go 2:1.16.2-1

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

  • Create a stickerpicker instance and implement in element
  • Send stickers, most of them will have a black background, but some will have a transparent background

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

viasux avatar Apr 03 '21 10:04 viasux

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

ShadowJonathan avatar Apr 03 '21 13:04 ShadowJonathan

(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

viasux avatar Apr 03 '21 13:04 viasux

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

mxc://matrix.org/jQGjxWzTIfhqVBpPBQKjOLcd

mxc://matrix.org/whhVHLOuOALIArEMLxmtsbib

mxc://matrix.org/MuqbQlrpCcbBCXvEstjzpwVv (the "growl" one from above)

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

mxc://matrix.org/jQGjxWzTIfhqVBpPBQKjOLcd

mxc://matrix.org/whhVHLOuOALIArEMLxmtsbib

mxc://matrix.org/MuqbQlrpCcbBCXvEstjzpwVv (the "growl" one from above)

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

ShadowJonathan avatar Apr 03 '21 14:04 ShadowJonathan

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

viasux avatar Apr 04 '21 06:04 viasux

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)

viasux avatar Apr 04 '21 06:04 viasux

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.

ShadowJonathan avatar Apr 04 '21 06:04 ShadowJonathan

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)

viasux avatar Apr 04 '21 07:04 viasux

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.

ShadowJonathan avatar Apr 04 '21 08:04 ShadowJonathan

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

viasux avatar Apr 04 '21 08:04 viasux

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

kegsay avatar Apr 07 '21 09:04 kegsay

Having the same issue.

ashley-graves avatar Apr 08 '23 10:04 ashley-graves

I would say the issue is coming from here and here

fabrixxm avatar Sep 22 '23 09:09 fabrixxm