: This article mainly introduces the php script for generating icons of various sizes with one click. For more information about PHP tutorials, see.
Array ("width" => 180, "height" => 180, "path" => "ios8", "name" => "Icon-180.png "), array ("width" => 120, "height" => 120, "path" => "ios8", "name" => "Icon-120.png "), array ("width" => 152, "height" => 152, "path" => "ios8", "name" => "Icon-152.png "), array ("width" => 76, "height" => 76, "path" => "ios8", "name" => "Icon-76.png "), array ("width" => 144, "height" => 144, "path" => "ios8", "name" => "Icon-144.png"), array (" Width "=> 72," height "=> 72," path "=>" ios8 "," name "=>" Icon-72.png "), array ("width" => 114, "height" => 114, "path" => "ios8", "name" => "Icon-114.png "), array ("width" => 57, "height" => 57, "path" => "ios8", "name" => "Icon-57.png "), array ("width" => 100, "height" => 100, "path" => "ios8", "name" => "Icon-100.png "), array ("width" => 50, "height" => 50, "path" => "ios8", "name" => "Icon-50.png "), array ("width" => 80, "heig Ht "=> 80," path "=>" ios8 "," name "=>" Icon-80.png "), array (" width "=> 40, "height" => 40, "path" => "ios8", "name" => "Icon-40.png"), array ("width" => 58, "height" => 58, "path" => "ios8", "name" => "Icon-58.png"), array ("width" => 29, "height" => 29, "path" => "ios8", "name" => "Icon-29.png "),), "IOS" => array ("width" => 180, "height" => 180, "path" => "ios ", "name" => "Icon-60@3x.png"), array ("width" => 120, "height "=> 120," path "=>" ios "," name "=>" Icon-60@2x.png "), array (" width "=> 152," height "=> 152, "path" => "ios", "name" => "Icon-76@2x.png"), array ("width" => 76, "height" => 76, "path" => "ios", "name" => "Icon-76.png"), array ("width" => 144, "height" => 144, "path" => "ios", "name" => "Icon-72@2x.png"), array ("width" => 72, "height" => 72, "path" => "ios", "name" => "Icon-72.png"), array ("width" => 114, "height" => 114, "path" => "Ios", "name" => "Icon-57@2x.png"), array ("width" => 57, "height" => 57, "path" => "ios", "name" => "Icon-57.png"), array ("width" => 100, "height" => 100, "path" => "ios", "name" => "Icon-50@2x.png"), array ("width" => 50, "height" => 50, "path" => "ios", "name" => "Icon-50.png"), array ("width" => 80, "height" => 80, "path" => "ios", "name" => "Icon-40@2x.png"), array ("width" => 40, "height" => 40, "path" => "ios", "name" => "I Con-40.png "), array (" width "=> 58," height "=> 58," path "=>" ios "," name "=>" Icon-29@2x.png "), array ("width" => 29, "height" => 29, "path" => "ios", "name" => "Icon-29.png "),), "ANDROID" => array ("width" => 144, "height" => 144, "path" => "android/drawable ", "name" => "icon.png"), array ("width" => 144, "height" => 144, "path" => "android/drawable-xhdpi ", "name" => "icon.png"), array ("width" => 72, "height" => 72, "path" => "android/drawable-hdpi", "name" => "icon.png"), array ("width" => 48, "height" => 48, "path" => "android/drawable-mdpi", "name" => "icon.png"), array ("width" => 32, "height" => 32, "path" => "android/drawable-ldpi", "name" => "icon.png "))); foreach ($ IconArray ["IOS8"] as $ key => $ IconType) {thumb ("icon.png", $ IconType ['width'], $ IconType ['height'], $ IconType ['path'], $ IconType ['name']);} foreach ($ IconArray ["IOS"] as $ key => $ IconType) {thumb ("icon.png", $ IconType ['width'], $ IconType ['height'], $ IconType ['path'], $ IconType ['name']);} foreach ($ IconArray ["ANDROID"] as $ key => $ IconType) {thumb ("icon.png", $ IconType ['width'], $ IconType ['height'], $ IconType ['path'], $ IconType ['name']) ;}?>
Usage: php IconMaster. php
The above describes the php script for generating icons of various sizes with one click, including the relevant content, and hope to help those who are interested in PHP tutorials.