Just a few years ago, the big complaint of the Android platform was that is was the wild west. Vendors could choose their own screen resolution and pixel density. This made it difficult for mobile app developers (and designers).

Fast forward to 2015 and there are iOS 7 and iOS 8 deployments, iPhone 4, 5, 5S, 5C, 6, 6P, iPad Mini, Mini Retina, iPad, and iPad Retina. If you want to render all of the needed icons and splash screens for your mobile app, it now looks like this …

iphone-size-comparison16px favicon
32px favicon
57px app icon
72px app icon
76px app icon
114px app icon
120px app icon
152px app icon
180px app icon
1536×2008 portrait launch image
768×1004 portrait launch image
1242×2148 portrait launch image
750×1294 portrait launch image
640×1096 portrait launch image
640×920 portrait launch image
320×460 portrait launch image
1024×748 landscape launch image
2208×1182 landscape launch image
2048×1496 landscape launch image

Thankfully, there is still ImageMagick and it’s ability to script the generation of all these different graphics.

Here is the updated script …

@echo off
echo Utility to generate all of the icons and splash screens for iOS.
echo One files needed in the current directory - mask.png
echo which is used to make iOS looking icons.
echo Assumes there is a file called src10241024.png and that the
echo 'important' material is 768x768 and centered with the remainder
echo of the area being solid color.
pause

for %%S in (16 32) do (
	echo making the %%Spx favicon
	convert src10241024.png -gravity Center -crop 512x512+0+0 -scale %%Sx%%S favicon%%S.ico
)

for %%S in (57 72 76 114 120 152 180) do (
	echo making the %%Spx app icon 
	convert src10241024.png -alpha off -gravity center mask768.png -compose CopyOpacity -composite -gravity center -crop 768x768+0+0 -scale %%Sx%%S -background transparent icon_%%S.png
)

for %%S in (1536x2008 768x1004 1242x2148 750x1294 640x1096 640x920 320x460) do (
	for /F "tokens=1,2 delims=x" %%A in ("%%S") do (
		echo making the %%Ax%%B portrait launch image
		convert src10241024.png -scale %%Bx%%B -gravity Center -crop %%Ax%%B+0+0 screen-%%Ax%%B.png
	)
)

for %%S in (1024x748 2208x1182 2048x1496) do (
	for /F "tokens=1,2 delims=x" %%A in ("%%S") do (
		echo making %%Ax%%B landscape launch image
		convert src10241024.png -scale %%Ax%%A -gravity Center -crop %%Ax%%B+0+0 -rotate 90 screen-%%Ax%%Br.png
	)
)

Eventually, the sour 1024×1024 image should be undated to about 2400×2400