Last active
September 6, 2022 09:00
-
-
Save FERR1TE/e5a3cfdebbff25dd3988c6712a658b1c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Resizes images with a bounding box that matches Telegram's sticker requirement without making them stretched or adding bars. | |
# Argument 1: input file (PNG) | |
# Argument 2: output file (PNG) | |
ffmpeg -i $1 -vf 'scale=if(gte(a\,512/512)\,min(512\,iw)\,-2):if(gte(a\,512/512)\,-2\,min(512\,ih))' $2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment