iOS APP表徵圖一鍵產生

來源:互聯網
上載者:User

iOS APP表徵圖一鍵產生

隨著工齡的漸長,發覺越來越懶,對於繁瑣的事情,總想少幹點,就像今天提及的APP表徵圖這個事,往常的做法無非是兩種,一是讓UI工程師提供所有尺寸的表徵圖,二是UI工程師給出一個大表徵圖,自己縮小,方法一可謂是害己又害人,雖然開發人員的工作量少,但一旦表徵圖調整,苦了UI工程師,又累了開發人員(要自己替換表徵圖);方法二,那可是夠累,開啟PS,調整映像大小,儲存,調整映像大小,儲存…,今天可謂終於忍無可忍,決定寫一個指令碼ios-icon-generator,下面簡單介紹下.

環境預備

它是一個shell指令碼,可以在MACOSX的bash直接運行,它依賴於強大的ImageMagick,因此在使用它之前,請先安裝ImageMagick

sudo brew install ImageMagick
安裝
git clone https://github.com/smallmuou/ios-icon-generatorcd ios-icon-generatorchmod 777 ios-icon-generator.sh
運行
StarnetdeMacBook-Pro:ios-icon-generator starnet$ ./ios-icon-generator.sh ~/Downloads/1024.png ~/output[INFO] Generate iTunesArtwork.png ...[INFO] Generate iTunesArtwork@2x.png ...[INFO] Generate Icon-Small.png ...[INFO] Generate Icon-Small@2x.png ...[INFO] Generate Icon-Small@3x.png ...[INFO] Generate Icon-Small-40.png ...[INFO] Generate Icon-Small-40@2x.png ...[INFO] Generate Icon-Small-40@3x.png ...[INFO] Generate Icon-60.png ...[INFO] Generate Icon-60@2x.png ...[INFO] Generate Icon-60@3x.png ...[INFO] Generate Icon-76.png ...[INFO] Generate Icon-76@2x.png ...[INFO] Generate Icon.png ...[INFO] Generate Icon@2x.png ...[INFO] Generate Icon-72.png ...[INFO] Generate Icon-72@2x.png ...[INFO] Generate Icon-Small-50.png ...[INFO] Generate Icon-Small-50@2x.png ...[INFO] Generate Done.
結果
StarnetdeMacBook-Pro:ios-icon-generator starnet$ ls -l ~/output/total 288-rw-r--r--  1 starnet  staff   1921 May 18 17:45 Icon-60.png-rw-r--r--  1 starnet  staff   4723 May 18 17:45 Icon-60@2x.png-rw-r--r--  1 starnet  staff   6954 May 18 17:45 Icon-60@3x.png-rw-r--r--  1 starnet  staff   2210 May 18 17:45 Icon-72.png-rw-r--r--  1 starnet  staff   5565 May 18 17:45 Icon-72@2x.png-rw-r--r--  1 starnet  staff   2184 May 18 17:45 Icon-76.png-rw-r--r--  1 starnet  staff   5856 May 18 17:45 Icon-76@2x.png-rw-r--r--  1 starnet  staff   1437 May 18 17:45 Icon-Small-40.png-rw-r--r--  1 starnet  staff   3267 May 18 17:45 Icon-Small-40@2x.png-rw-r--r--  1 starnet  staff   4723 May 18 17:45 Icon-Small-40@3x.png-rw-r--r--  1 starnet  staff   1674 May 18 17:45 Icon-Small-50.png-rw-r--r--  1 starnet  staff   3992 May 18 17:45 Icon-Small-50@2x.png-rw-r--r--  1 starnet  staff   1168 May 18 17:45 Icon-Small.png-rw-r--r--  1 starnet  staff   1786 May 18 17:45 Icon-Small@2x.png-rw-r--r--  1 starnet  staff   2393 May 18 17:45 Icon-Small@3x.png-rw-r--r--  1 starnet  staff   1828 May 18 17:45 Icon.png-rw-r--r--  1 starnet  staff   4491 May 18 17:45 Icon@2x.png-rw-r--r--  1 starnet  staff  19995 May 18 17:45 iTunesArtwork.png-rw-r--r--  1 starnet  staff  30653 May 18 17:45 iTunesArtwork@2x.png
綜述

該指令碼使用起來非常簡單,需要的朋友歡迎使用.

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.