zulip / zulip

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
https://zulip.com
Apache License 2.0
21.51k stars 7.8k forks source link

Custom GIF emoji - alpha color v2 #16370

Open alfonsrv opened 4 years ago

alfonsrv commented 4 years ago

As per #10351, the error still occurs with Zulip 3.2. Uploading custom emojis GIFs results in unexpected behavior. Turning on or off the optimize= flag does not change anything about it.

Example: uploading a Giphy sticker, mostly results in a black background – here, on the official Zulip server.

nice-normal, ref
nice-black
Side note: It would also be nice if extra padding was added to the top and bottom to convert the image to 1:1 ratio rather than cut it off.

Another artifact I encountered was uploading another sticker, resulting in not only a black background but also some other artifacts.

nice-normal, ref
nice-black

timabbott commented 4 years ago

10351 has useful context; debugging this will likely involve spending some type looking at Pillow and debugging, and potentially reporting an upstream bug. @HarshitOnGitHub did this with the previous iteration of this sort of bug, and may have some context as well.

akshatdalton commented 4 years ago

@alfonsrv @timabbott can you help me reproduce this bug as this seems to be working fine with me. Uploaded GIFs do not show any black background.

custom emoji

alfonsrv commented 4 years ago

@akshatdalton What I do is:

  1. Download the image via Chrome
  2. Go to chat.zulip.org, click Settings -> Organization -> Custom Emoji
  3. Choose the GIF I just downloaded, name it e.g. akshat1 and upload.

In the preview pane you should now see the same result as shown above. Not sure what you're doing, but this clearly doesn't seem like an upload to Zulip, as it would cut off the sides of the Nice-GIF in the current way Zulip handles GIF conversion, as outlined above.

akshatdalton commented 4 years ago

I am working on this issue.

timabbott commented 4 years ago

Several classes of this form of issue were fixed in https://github.com/zulip/zulip/pull/16456 thanks to excellent work by @codypiersall; the remaining ones appear to be an upstream PIL bug (which we should link here once it's filed).

gnprice commented 1 year ago

Reopening because the issue hasn't been fixed. Some recent discussion in chat.