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

Add pixel size to tooltip and gif support with FFmpeg for avatar upload #3329

Merged
merged 3 commits into from
Nov 25, 2020

Conversation

kimsible
Copy link
Contributor

@kimsible kimsible commented Nov 19, 2020

Description

  • Add max resolution 192x192 (after resize) in tooltip avatar upload
  • Add gif support for avatar with FFmpeg process

Related issues

Gif support only : #3299

Has this been tested?

- [ ] 👍 yes, I added tests to the test suite Didn't found any unit test for Image processing

  • 👍 yes, light tests as follows are enough

I just live tested, does it need unit test @Chocobozzz ?

Screenshots

Peek 19-11-2020 02-13

@Chocobozzz
Copy link
Owner

Add gif support for avatar as a copy, Jimp does not support gif resize

I'm sorry but we can't just copy unknown files from users, without resize or compression

@kimsible
Copy link
Contributor Author

Add gif support for avatar as a copy, Jimp does not support gif resize

I'm sorry but we can't just copy unknown files from users, without resize or compression

@Chocobozzz I didn't make it to compress and resize gif with Jimp, would you help ?

@rigelk
Copy link
Collaborator

rigelk commented Nov 19, 2020

@kimsible you might need a plugin for Jimp to bring it support of gifs, like https://github.com/jtlapp/gifwrap

@kimsible
Copy link
Contributor Author

kimsible commented Nov 19, 2020

@kimsible you might need a plugin for Jimp to bring it support of gifs, like https://github.com/jtlapp/gifwrap

@rigelk thanks, you mean with need a new filter / action server side to handle it ? also how can we filter the extensions list constant ?

Edit : Don't hesitate to propose changes to include filters server side

@rigelk rigelk linked an issue Nov 19, 2020 that may be closed by this pull request
@Chocobozzz
Copy link
Owner

ffmpeg might me able to resize a gif

@rigelk rigelk marked this pull request as draft November 21, 2020 11:52
@kimsible
Copy link
Contributor Author

Thanks @Chocobozzz @rigelk for the tips, it now uses FFmpeg to process GIF :

  • Reduce to 15 FPS
  • Scale to maximum avatar size

Cons :

  • It does not handle GIF transparency but white is the default color of FFmpeg, so transparent GIF will fit to the PeeTube design.

@kimsible kimsible marked this pull request as ready for review November 21, 2020 15:26
@kimsible kimsible force-pushed the feat/format-avatar-tooltip branch from 1ea77eb to 8ce3253 Compare November 21, 2020 15:28
@kimsible kimsible changed the title Add pixel size to tooltip and gif support for avatar upload Add pixel size to tooltip and gif support with FFmpeg for avatar upload Nov 21, 2020
@Chocobozzz Chocobozzz merged commit 123f619 into Chocobozzz:develop Nov 25, 2020
@Chocobozzz
Copy link
Owner

Please next time add unit tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support image/gif for profile pictures
3 participants