ImageMagick を使って白黒のグレースケール画像から、白の部分のみをイキにして、黒の部分を透過にして、透過PNGを作成して、Android アプリの通知用アイコン ic_notification.png
をコマンドラインで生成する手順。
# 白黒グレースケール画像から、黒の部分を透過に抜く。白の部分はイキ
convert black.png -background white -channel a -combine white.png
# dpi 別のフォルダ
mkdir mipmap-mdpi mipmap-hdpi mipmap-xhdpi mipmap-xxhdpi mipmap-xxxhdpi
# xxxhdpi: 96x96
convert white.png -resize 96x96 mipmap-xxxhdpi/ic_notification.png
# xxhdpi: 72x72
convert white.png -resize 72x72 mipmap-xxhdpi/ic_notification.png
# xhdpi: 48x48
convert white.png -resize 48x48 mipmap-xhdpi/ic_notification.png
# hdpi: 36x36
convert white.png -resize 36x36 mipmap-hdpi/ic_notification.png
# mdpi: 24x24
convert white.png -resize 24x24 mipmap-mdpi/ic_notification.png