2018년 12월 24일 월요일

[Utility] ImageMagick Examples


1. Make Android Icon

C:\> andicon.bat  
1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
mkdir %1
mkdir %1\drawable-mdpi
mkdir %1\drawable-hdpi
mkdir %1\drawable-xhdpi
mkdir %1\drawable-xxhdpi
mkdir %1\drawable-xxxhdpi
convert.exe %1.png -resize 48x48   %1\drawable-mdpi\%1.png
convert.exe %1.png -resize 72x72   %1\drawable-hdpi\%1.png
convert.exe %1.png -resize 96x96   %1\drawable-xhdpi\%1.png
convert.exe %1.png -resize 144x144 %1\drawable-xxhdpi\%1.png
convert.exe %1.png -resize 192x192 %1\drawable-xxxhdpi\%1.png


2. Make Font Image

- English Character

1
convert -size 768x128 xc:white -font Ravie -pointsize %1 -stroke black -strokewidth 8 -annotate +25+100 %2 -blur 0x8 -fill white   -stroke none   -annotate +25+100 %2 %2.png


- Korean Character
1
2
3
set font=malgunbd.ttf

convert -size 512x300 xc:white -font %font% -pointsize %1 -stroke black -strokewidth 8 -annotate +4+200 %2 -blur 0x8 -fill white -stroke none -annotate +4+200 %2 %2.png