4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

s9icongen - iOSのアイコン生成を自動化するRubyスクリプト

Posted at

アイコンと起動画面のデザインを更新するたびに、サイズはいくつで作ればいいのだっけ?どのファイル名が何のサイズなんだっけ?を思いだすのに発狂しそうになるので、自動化するスクリプトが転がってないか探した。

中身はRubyスクリプトなので改造もしやすい。

使い方

それぞれ解凍先に icon.png, launch.png を置く。リサイズしてくれるのでサイズは大体でOK。詳しくはREADME

$ cd ../s9icongen/
$ ruby s9icongen.rb icon.png

$ ls icons/
Icon-120.png	
Icon-29.png	
Icon-29@2x.png	
Icon-29@3x.png	
Icon-40@2x.png	
Icon-40@3x.png	
Icon-60@2x.png	
Icon-60@3x.png	
Icon-76.png
Icon-76@2x.png	
iTunesArtwork
iTunesArtwork@2x

なぜかIcon-40.pngが作られないので、これだけはIcon-40@2x.pngを手で縮小して作った。(後で自動化したい)

$ cd s9splashgen
$ ruby s9splashgen.rb launch.png universal

$ ls screens/
Default@2x~iphone.png
Default-568h@2x~iphone.png
Default-667h@2x~iphone.png
Default-736h@3x~iphone.png
Default-Landscape~ipad.png
Default-Portrait~ipad.png
Default-Landscape@2x~ipad.png
Default-Portrait@2x~ipad.png

新アイコンと新起動画面

アイコン

pictruby-0323-02.png

起動画面

pictruby-0323-01.png

前よりは良くなったんじゃないだろうか。

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?