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

supprimer le fond d'une image / recette #965

Open
louis-ev opened this issue May 1, 2024 · 2 comments
Open

supprimer le fond d'une image / recette #965

louis-ev opened this issue May 1, 2024 · 2 comments

Comments

@louis-ev
Copy link
Member

louis-ev commented May 1, 2024

Exemple d'un paquet qui tourne uniquement côté client :
https://github.com/imgly/background-removal-js

à creuser

@louis-ev
Copy link
Member Author

louis-ev commented May 1, 2024

Apparemment les modèles font 40 ou 80mb (!) !
Peut-être faire ça côté serveur plutôt, à voir.

@louis-ev
Copy link
Member Author

Peut être jouable avec ffmpeg : https://superuser.com/a/1749888

ffmpeg -i input.jpg -vf colorkey=white:0.3:0.5 out.png

Change 0.3 to 0.01 if you want only white(#ffffff) to be affected, without close colors.

Change 0.5 to whatever transparency amount you want, 0.0 will be fully transparent.

More info here.

https://www.ffmpeg.org/ffmpeg-filters.html#colorkey

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

No branches or pull requests

1 participant