Recommend this page to a friend! |
![]() ![]() |
Info | ![]() |
![]() |
![]() ![]() |
Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2022-10-21 (23 days ago) ![]() | ![]() ![]() ![]() ![]() ![]() | Total: 220 This week: 4 | All time: 8,213 This week: 221![]() |
Version | License | PHP version | Categories | |||
morgen 0.3 | MIT/X Consortium ... | 5.3 | PHP 5, Graphics |
Description | Author | |||
This class can generate icons for multiple types of platforms. Innovation Award
|
|
Android and iOS developers know that designing one icon set for their application is not enough: because of many device types and screen sizes they have to create resized pictire collections for many "resolutions". These sets should be placed in "resources" subfolders according to device types/display resolutions.
Android Studio has a special tools for dealing with them (Android media tools), some people use Photoshop/Illustrator scripts that automate creating icon sets for all resolutions. And there are a many other tools for that.
Here is a PHP solution. It can make resized versions for JPG, PNG, GIF source files.
If you have installed some SVG-to-PNG converter program (inkscape for example) that can work with command line parameters, Morgen can convert SVG files too (resized versions will be of PNG type).
include_once('../src/morgen.php');
$generator = new \Morgen\IconGenerator();
// show full cmd line for your inkscape installation:
$generator->setSvgConvertor('D:/inkscape/inkscape.exe -z {from} -e {to}');
$options = array(
'project' => 'project-greatApp.xml',
'forced' => false
);
$generator->createIconsFromImages($options);
Morgen can create all icon sets from a single media pack for all defined projects: for android version, for ios version, for web application etc. All you need is defining all "application types" in XML configuration file.
You will find default configuration file morgen.cfg.xml, that contains three "predefined" profiles (application types) for generated pictures: "android", "ios" and "webapp" (webapp is just a sample).
To change them or add your own ones, edit the global parameters in morgen.cfg.xml - it should be placed in the same folder with morgen.php module.
And you have to create definition XML file for each project, where you can choose desired application types, destination folders, used devices types, and selected files.
See a wiki for using details.
Distributed under MIT License MIT
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
User Ratings | ||||||||||||||||||||||||||||||
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.