100 lines
3.6 KiB
Bash
100 lines
3.6 KiB
Bash
|
|
|
|
### Android format
|
|
#"android-chrome-144x144.png",
|
|
#"android-chrome-192x192.png",
|
|
#"android-chrome-256x256.png",
|
|
#"android-chrome-36x36.png",
|
|
#"android-chrome-384x384.png",
|
|
#"android-chrome-48x48.png",
|
|
#"android-chrome-512x512.png",
|
|
#"android-chrome-72x72.png",
|
|
#"android-chrome-96x96.png"
|
|
set -A androids -- 36 48 72 96 144 192 256 384 512
|
|
|
|
### Apple Icon
|
|
#"apple-touch-icon-1024x1024.png",
|
|
#"apple-touch-icon-114x114.png",
|
|
#"apple-touch-icon-120x120.png",
|
|
#"apple-touch-icon-144x144.png",
|
|
#"apple-touch-icon-152x152.png",
|
|
#"apple-touch-icon-167x167.png",
|
|
#"apple-touch-icon-180x180.png",
|
|
#"apple-touch-icon-57x57.png",
|
|
#"apple-touch-icon-60x60.png",
|
|
#"apple-touch-icon-72x72.png",
|
|
#"apple-touch-icon-76x76.png",
|
|
#"apple-touch-icon-precomposed.png",
|
|
#"apple-touch-icon.png"
|
|
set -A apple_icons -- 57 60 72 76 114 120 144 152 167 180 1024
|
|
|
|
### Apple StartUp
|
|
#"apple-touch-startup-image-1125x2436.png",
|
|
#"apple-touch-startup-image-1136x640.png",
|
|
#"apple-touch-startup-image-1242x2208.png",
|
|
#"apple-touch-startup-image-1242x2688.png",
|
|
#"apple-touch-startup-image-1334x750.png",
|
|
#"apple-touch-startup-image-1536x2048.png",
|
|
#"apple-touch-startup-image-1620x2160.png",
|
|
#"apple-touch-startup-image-1668x2224.png",
|
|
#"apple-touch-startup-image-1668x2388.png",
|
|
#"apple-touch-startup-image-1792x828.png",
|
|
#"apple-touch-startup-image-2048x1536.png",
|
|
#"apple-touch-startup-image-2048x2732.png",
|
|
#"apple-touch-startup-image-2160x1620.png",
|
|
#"apple-touch-startup-image-2208x1242.png",
|
|
#"apple-touch-startup-image-2224x1668.png",
|
|
#"apple-touch-startup-image-2388x1668.png",
|
|
#"apple-touch-startup-image-2436x1125.png",
|
|
#"apple-touch-startup-image-2688x1242.png",
|
|
#"apple-touch-startup-image-2732x2048.png",
|
|
#"apple-touch-startup-image-640x1136.png",
|
|
#"apple-touch-startup-image-750x1334.png",
|
|
#"apple-touch-startup-image-828x1792.png"
|
|
set -A apple_startups -- "640x1136" "750x1334" "828x1792"
|
|
set -A apple_startups -- "${apple_startups[@]}" "1125x2436" "1136x640" "1242x2208" "1242x2688" "1334x750" "1536x2048"
|
|
set -A apple_startups -- "${apple_startups[@]}" "1620x2160" "1668x2224" "1668x2388" "1792x828" "2048x1536" "2048x2732"
|
|
set -A apple_startups -- "${apple_startups[@]}" "2160x1620" "2208x1242" "2388x1668" "2436x1125"
|
|
set -A apple_startups -- "${apple_startups[@]}" "2688x1242" "2732x2048"
|
|
|
|
### Opera Coast
|
|
set -A opera_coasts -- 228
|
|
|
|
### Favicons sizes
|
|
set -A fav_sizes -- 16 32 48
|
|
|
|
### Firefox OS
|
|
set -A firefoxes -- 60 128 512
|
|
|
|
### Windows MS Tile
|
|
#"mstile-144x144.png",
|
|
#"mstile-150x150.png",
|
|
#"mstile-310x150.png",
|
|
#"mstile-310x310.png",
|
|
#"mstile-70x70.png"
|
|
set -A ms_tiles -- "70x70" "144x144" "150x150" "310x150" "310x310"
|
|
|
|
### Yandex
|
|
set -A yandexes -- 50
|
|
|
|
# Need ImageMagick
|
|
|
|
logo=""
|
|
|
|
function favicon() {
|
|
convert -resize x16 -gravity center -crop 16x16+0+0 -flatten -colors 256 input.png output-16x16.ico
|
|
convert -resize x32 -gravity center -crop 32x32+0+0 -flatten -colors 256 input.png output-32x32.ico
|
|
convert output-16x16.ico output-32x32.ico favicon.ico
|
|
convert -resize x152 input.png apple-touch-icon-152x152.png
|
|
convert -resize x120 input.png apple-touch-icon-120x120.png
|
|
convert -resize x76 input.png apple-touch-icon-76x76.png
|
|
convert -resize x60 input.png apple-touch-icon-60x60.png
|
|
}
|
|
|
|
# With Inkscape (to prefer)
|
|
inkscape -w 1024 -h 1024 "${logo}" --export-filename "${logo}".png
|
|
convert -background none -size 1024x1024 "${logo}" "${logo}".png
|
|
|
|
# convert SVG Logo to ico
|
|
convert -density 256x256 -background transparent "${logo}" -define icon:auto-resize -colors 256 favicon.ico
|