Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uploading animated gif results in corrupted colours #11599

Open
ghost opened this issue Aug 18, 2019 · 6 comments
Open

Uploading animated gif results in corrupted colours #11599

ghost opened this issue Aug 18, 2019 · 6 comments
Labels
area/media processing bug Something isn't working

Comments

@ghost
Copy link

ghost commented Aug 18, 2019

Currently when I upload my avatar, it gets resized and this causes some corruption of the colours:

Original:
new-avatar

Static resized:
bad-avatar

This is in v2.9.3.

It would be nice if instead of a poorly compressed gif, animated avatars could be uploaded as either mp4 or webm instead. This would reduce the burden of high speed animations on low end systems and also improve the quality of resized animated avatars.

@stale
Copy link

stale bot commented Oct 26, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the status/wontfix This will not be worked on label Oct 26, 2019
@Kurty00
Copy link

Kurty00 commented Jan 7, 2023

I'm having a similar issue with my avatar. It's corrupting the gif even if I upload it at the size it's supposed to be downscaled to.
Original :
Original.gif

Corrupted :
Corrupted.gif

@TheEssem
Copy link
Contributor

The ImageMagick command used for processing profile picture uploads seems to be missing the -coalesce operator, which is necessary a lot of the time for proper GIF manipulation. However, this also increases the filesize significantly for many GIFs; this can be mitigated slightly with -layers optimize at the end, but it isn't a silver bullet and may just make it worse.

@kescherCode
Copy link
Contributor

In general, when working with GIFs, I've found both ffmpeg and Gifsicle to be much better both in terms of filesize and... not corrupting the GIFs. I might replace GIF optimizations with either of these two in my fork.

@TheEssem
Copy link
Contributor

I can personally vouch for libvips and the cgif encoder, they're incredibly performant and have plenty of options for optimization. Seems like moving away from Paperclip would allow for easier usage of vips, see #7414 and #20269.

@vmstan vmstan added bug Something isn't working and removed status/wontfix This will not be worked on labels Oct 13, 2023
@vmstan
Copy link
Contributor

vmstan commented May 21, 2024

Possible that #30090 addresses this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/media processing bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants