Created
January 2, 2019 04:51
-
-
Save andresaquino/27e1ddd4ef8849a05159dd64b6ca99e7 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
Image edition | |
# convert white color to transparency | |
convert <image.png> -fuzz 5% -transparent white <new-image.png> | |
# resize image to 24, 48, 64, 96 & 128 preserving ratio (width) | |
for isize in 24 48 64 96 128 | |
do | |
ffmpeg -i <original-img.png> -vf scale=${isize}:-1 <image_${isize}.png> | |
done | |
# resize image to 24, 48, 64, 96 & 128 preserving ratio (height) | |
for isize in 24 48 64 96 128 | |
do | |
ffmpeg -i <original-img.png> -vf scale=-1:${isize} <image_${isize}.png> | |
done | |
# vim: ft=sh: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment