Kilho.net
Miscellaneous

Image Resizing All at Once

A way to generate all the different sizes of icons and splash images needed when developing iPhone and Android apps at once.

These sizes are used in FireMonkey, so change the numbers for other environments.

I lost (?) the program I’d made earlier, so I put this together in a hurry … ㅠㅠ

1. Install GraphicsMagick

2. Splash image generation batch file

gm convert -resize "320x480^" -gravity center -crop "320x480+0+0" "%1" splash_320x480.png
gm convert -resize "426x320^" -gravity center -crop "426x320+0+0" "%1" splash_426x320.png
gm convert -resize "470x320^" -gravity center -crop "470x320+0+0" "%1" splash_426x320.png
gm convert -resize "640x480^" -gravity center -crop "640x480+0+0" "%1" splash_426x320.png
gm convert -resize "640x960^" -gravity center -crop "640x960+0+0" "%1" splash_640x960.png
gm convert -resize "640x1136^" -gravity center -crop "640x1136+0+0" "%1" splash_640x1136.png
gm convert -resize "750x1334^" -gravity center -crop "750x1334+0+0" "%1" splash_750x1334.png
gm convert -resize "960x720^" -gravity center -crop "960x720+0+0" "%1" splash_426x320.png
gm convert -resize "1125x2436^" -gravity center -crop "1125x2436+0+0" "%1" splash_1125x2436.png
gm convert -resize "2436x1125^" -gravity center -crop "2436x1125+0+0" "%1" splash_2436x1125.png

3. Icon generation batch file

gm convert -resize "36x36^" -gravity center -crop "36x36+0+0" "%1" icon_36x36.png
gm convert -resize "48x48^" -gravity center -crop "48x48+0+0" "%1" icon_48x48.png
gm convert -resize "57x57^" -gravity center -crop "57x57+0+0" "%1" icon_57x57.png
gm convert -resize "60x60^" -gravity center -crop "60x60+0+0" "%1" icon_60x60.png
gm convert -resize "72x72^" -gravity center -crop "72x72+0+0" "%1" icon_72x72.png
gm convert -resize "87x87^" -gravity center -crop "87x87+0+0" "%1" icon_87x87.png
gm convert -resize "96x96^" -gravity center -crop "96x96+0+0" "%1" icon_96x96.png
gm convert -resize "114x114^" -gravity center -crop "114x114+0+0" "%1" icon_114x114.png
gm convert -resize "120x120^" -gravity center -crop "120x120+0+0" "%1" icon_120x120.png
gm convert -resize "144x144^" -gravity center -crop "144x144+0+0" "%1" icon_144x144.png
gm convert -resize "180x180^" -gravity center -crop "180x180+0+0" "%1" icon_180x180.png

Deixe um comentário

O seu endereço de email não será publicado. Campos obrigatórios marcados com *