Skip to content

Instantly share code, notes, and snippets.

@phelrine
Created October 18, 2011 03:57
Show Gist options
  • Save phelrine/1294575 to your computer and use it in GitHub Desktop.
Save phelrine/1294575 to your computer and use it in GitHub Desktop.
移行アイコン作成
#!/bin/sh
new_icon=$1
old_icon=$2
composite_icon_name=$3
percentage=35
size=`identify $new_icon | cut -d' ' -f3 | cut -d'x' -f1`
resize_size=$(($size * $percentage / 100))
geometry=$(($size - $resize_size))
convert $old_icon -resize ${resize_size}x${resize_size} png:- | composite -geometry +${geometry}+${geometry} png:- $new_icon $composite_icon_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment