是否有一种方法来创建xxhdpi, xhdpi, hdpi, mdpi和ldpi绘制从一个大规模的图像自动?例如,假设我有一个512x512的图像,我想在适当的文件夹中有这个图像的不同版本,用于Android支持的不同屏幕分辨率。


当前回答

选择#5:使用图像面包师是片状的。我转换了两张图像,它就停止了。 我成功地转换了10张图片:https://nsimage.brosteins.com/

其他回答

编辑:

这个网站现在叫做appicon.co


我通常使用assets.codly.io 它在您的浏览器中本地生成资产,无需上传,无需下载。

我在这个线程中使用解决方案,它很容易与插件Android Drawable Importer一起工作

如果你在MacOS上使用Android Studio,只需尝试以下步骤即可进入:

点击菜单栏Android Studio然后选择首选项或点击按钮Command +, 然后选择插件 单击浏览存储库 在搜索栏中写入Android Drawable Importer 点击安装按钮 然后重启对话框显示,重新启动Android Studio

成功安装插件后,只需单击创建新菜单,然后选择批量可绘制导入。然后点击加号按钮,也就是添加按钮,然后选择你的文件使可绘制。然后点击确定,确定绘图器已经全部完成了。

如果你不明白我说的话,可以看看学习机里的图片教程。

选择#5:使用图像面包师是片状的。我转换了两张图像,它就停止了。 我成功地转换了10张图片:https://nsimage.brosteins.com/

我使用的是“Android Asset Studio”。现在我使用的是IconKitchen,它是Android Asset Studio的继承者,是一种为Android、iOS、web、Windows、Linux和Mac制作高度自定义应用图标的新方法。

Just use https://romannurik.github.io/AndroidAssetStudio/index.html. It can make a set of icons from an image, later you can download a zip-file. Or download a Windows application at https://github.com/redwarp/9-Patch-Resizer/releases (doesn't need to install) and open an icon. Also you can use a plugin Android Drawable Importer, see answers above. Because it is abandoned, install forks. See Why does Android Drawable Importer ignore selection in AS 3.5 onwards or https://github.com/Vincent-Loi/android-drawable-importer-intellij-plugin. https://appicon.co/#image-sets.