Notice: The Monaca & Onsen UI Community Forum is shutting down.
For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.
Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.
A site to generate all app icons
-
Does there exist a site that can generate different app icons for android and app store ?
Or is this built in in Monaca somewhere ?
-
I don´t know any site, but I wrote a small php-Script. Just place the original icons “appIconAndroid.png” and “appIconIos.png” in the same folder from the script and create the subfolder iosIcons and androidIcons. The script will create the needed icons in the subfolder. Maybe this helps.
function resizeImagePng($sourceImage, $targetImage, $maxWidth, $maxHeight, $quality = 9)
{
// Obtain image from given source file.
if (!$image = @imagecreatefrompng($sourceImage))
{
return false;
}// Get dimensions of source image. list($origWidth, $origHeight) = getimagesize($sourceImage); if ($maxWidth == 0) { $maxWidth = $origWidth; } if ($maxHeight == 0) { $maxHeight = $origHeight; } // Calculate ratio of desired maximum sizes and original sizes. $widthRatio = $maxWidth / $origWidth; $heightRatio = $maxHeight / $origHeight; // Ratio used for calculating new image dimensions. $ratio = min($widthRatio, $heightRatio); // Calculate new image dimensions. $newWidth = (int)$origWidth * $ratio; $newHeight = (int)$origHeight * $ratio; // Create final image with new dimensions. $newImage = imagecreatetruecolor($newWidth, $newHeight); imagecopyresampled($newImage, $image, 0, 0, 0, 0, $newWidth, $newHeight, $origWidth, $origHeight); imagepng($newImage, $targetImage, $quality); // Free up the memory. imagedestroy($image); imagedestroy($newImage); return true;
}
$iosIcons = array(1024, 512, 256, 196, 180, 172, 167, 152, 144, 158, 128, 120, 114, 100, 88, 87, 80, 76, 72, 64, 60, 58, 57, 55, 50, 48, 40, 32, 29, 20, 16);
$androidIcons = array(512, 192, 144, 96, 72, 48, 36);
$folder = ‘iosIcons’;
foreach ($iosIcons as $width) {
$result = resizeImagePng(“appIconIos.png”, $folder ."/Icon-" . $width.".png", 0, $width);
}
$folder = ‘androidIcons’;
foreach ($androidIcons as $width) {
$result = resizeImagePng(“appIconAndroid.png”, $folder ."/Icon-" . $width.".png", 0, $width);
}
-
https://pgicons.abiro.com - Generates for Cordova specifically
https://appicon.co/ - Pretty slick site
https://romannurik.github.io/AndroidAssetStudio/icons-launcher.html#foreground.type=clipart&foreground.clipart=android&foreground.space.trim=1&foreground.space.pad=0.25&foreColor=rgba(96%2C 125%2C 139%2C 0)&backColor=rgb(68%2C 138%2C 255)&crop=0&backgroundShape=circle&effects=none&name=ic_launcher - This has been around a long time
https://tools.crawlink.com/tools/pwa-icon-generator/ - This is for PWA’s.