Skip to content

Instantly share code, notes, and snippets.

@ldenoue
Last active October 12, 2022 09:09
Show Gist options
  • Save ldenoue/56c0209a4d70495554af2527fa3f9bab to your computer and use it in GitHub Desktop.
Save ldenoue/56c0209a4d70495554af2527fa3f9bab to your computer and use it in GitHub Desktop.
make mac os app icons (need 50 pixels padding around, see https://bootcamp.uxdesign.cc/creating-app-icons-for-macos-11-and-up-1132ccd479bc )
if [ "$#" -eq 2 ]
then
mkdir $2
ffmpeg -y -i $1 -vf scale=16x16 $2/icon-16x16@1x.png
ffmpeg -y -i $1 -vf scale=32x32 $2/icon-16x16@2x.png
ffmpeg -y -i $1 -vf scale=32x32 $2/icon-32x32@1x.png
ffmpeg -y -i $1 -vf scale=64x64 $2/icon-32x32@2x.png
ffmpeg -y -i $1 -vf scale=128x128 $2/icon-128x128@1x.png
ffmpeg -y -i $1 -vf scale=256x256 $2/icon-128x128@2x.png
ffmpeg -y -i $1 -vf scale=256x256 $2/icon-256x256@1x.png
ffmpeg -y -i $1 -vf scale=512x512 $2/icon-256x256@2x.png
ffmpeg -y -i $1 -vf scale=512x512 $2/icon-512x512@1x.png
ffmpeg -y -i $1 -vf scale=1024x1024 $2/icon-512x512@2x.png
else
echo "please pass your image filename and a directory to put results in"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment