调整图像大小后

调整图像大小后

这是一种生成iPhone和Android应用程序开发所需的几种图标和启动图像大小的方法。

大小是FireMonkey使用的大小,请更改其他环境中的数字。

我丢失了现有的程序并且匆匆忙忙...... ㅠㅠ

1. GraphicsMagick 安装

2.创建启动图像批处理文件

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.创建图标批处理文件

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