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


当前回答

使用像Image Baker这样的在线服务。

这很简单。在Android和iOS上上传图片和下载处理过的资产。

注:Image Baker是我的朋友和我自己创建的免费服务。

其他回答

最简单的方法是使用资源管理器

然后你可以选择每个密度

导入后,你可以看到这张图片的6个不同版本

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

我在Eclipse中使用一个名为Android Icon Set的工具来设置标准图标,如Launcher、ActionBar、Tab图标和通知图标。你可以从File -> New -> Other..——> Android——> Android Icon Set。最好的部分是,你可以从你的电脑选择任何文件,它会自动将所有标准大小的图像放入你的项目目录。

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.

使用这个来生成启动器图标

https://appicon.co/

使用它来生成可绘制的图标

https://www.img-bak.in/