Last active
October 13, 2015 00:58
Revisions
-
lavoiesl revised this gist
Oct 28, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
Empty file. -
lavoiesl revised this gist
Oct 28, 2014 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,7 @@ #!/bin/bash # Converts an image in a multi-resolution favicon # Requires Imagemagick # @link https://gist.github.com/lavoiesl/4113857 if [[ "$#" != "2" ]]; then echo "Usage: $0 input.png output.ico" >&2 -
lavoiesl revised this gist
Nov 8, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -15,7 +15,7 @@ files="" for size in $sizes; do file="$tmp_dir/$size.png" convert "$input" -depth 8 -background transparent -flatten -resize "${size}x${size}" "$file" files="$files $file" done -
lavoiesl revised this gist
Nov 8, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -19,5 +19,5 @@ for size in $sizes; do files="$files $file" done convert $files $output rm -R $tmp_dir -
lavoiesl revised this gist
Nov 8, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -19,5 +19,5 @@ for size in $sizes; do files="$files $file" done convert $files -colors 256 $output rm -R $tmp_dir -
lavoiesl revised this gist
Nov 8, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -19,5 +19,5 @@ for size in $sizes; do files="$files $file" done convert $files -colors $output rm -R $tmp_dir -
lavoiesl revised this gist
Nov 8, 2013 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -15,9 +15,9 @@ files="" for size in $sizes; do file="$tmp_dir/$size.png" convert "$input" -background transparent -colors 256 -flatten -resize "${size}x${size}" "$file" files="$files $file" done convert $files $output rm -R $tmp_dir -
lavoiesl created this gist
Nov 19, 2012 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ #!/bin/bash # Converts an image in a multi-resolution favicon # Requires Imagemagick if [[ "$#" != "2" ]]; then echo "Usage: $0 input.png output.ico" >&2 exit 1 fi input="$1" output="$2" sizes="16 32 64 128 256" tmp_dir=$(mktemp -d /tmp/favicon.XXXXXXXXXX) files="" for size in $sizes; do file="$tmp_dir/$size.png" convert "$input" -resize "${size}x${size}" "$file" files="$files $file" done convert $files -colors 256 $output rm -R $tmp_dir