Skip to content

Instantly share code, notes, and snippets.

@lopespm
Created October 6, 2018 00:20
Show Gist options
  • Save lopespm/9bbb7ba4f6b06f41bcea969f70686e49 to your computer and use it in GitHub Desktop.
Save lopespm/9bbb7ba4f6b06f41bcea969f70686e49 to your computer and use it in GitHub Desktop.
Pack a multi-dimension .ICO from a source image, using imagemagick
#!/bin/bash
build_folder="build"
source_image="source-image.png"
mkdir $build_folder
convert $source_image -scale 16 $build_folder/16.png
convert $source_image -scale 32 $build_folder/32.png
convert $source_image -scale 48 $build_folder/48.png
convert $source_image -scale 128 $build_folder/128.png
convert $source_image -scale 256 $build_folder/256.png
convert $build_folder/16.png $build_folder/32.png $build_folder/48.png $build_folder/128.png $build_folder/256.png icon.ico
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment