Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.