有没有办法从大规模的形象创造xxhdpi,xhdpi,华电国际,MDPI和LDPI可绘制? [英] Is there a way to create xxhdpi, xhdpi, hdpi, mdpi and ldpi drawables from a large scale image?

查看:112
本文介绍了有没有办法从大规模的形象创造xxhdpi,xhdpi,华电国际,MDPI和LDPI可绘制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法来自动大规模映像创建xxhdpi,xhdpi,华电国际,MDPI和LDPI可绘制?例如,假设我有一个512×512的图像,我希望有不同版本的图像通过Android的在相应的文件夹支持不同的屏幕分辨率。

Is there a way to create xxhdpi, xhdpi, hdpi, mdpi and ldpi drawables from a large scale image automatically? For example assume that I have a 512x512 image and I want to have different versions of this images for different screen resolutions supported by Android in appropriate folders.

推荐答案

选项#1:只要船 -xxhdpi 可绘制,让Android的下采样他们为你在运行时(不足:只能在相当新的设备,其中 -xxhdpi 是已知的)

Option #1: Just ship the -xxhdpi drawables and let Android downsample them for you at runtime (downside: will only work on fairly recent devices, where -xxhdpi is known).

选项2:使用 Android的资产工作室下采样它们。

Option #2: Use Android Asset Studio to downsample them for you.

选项#3:自动化中的图形编辑器的过程中,每ssantos答案

Option #3: Automate the process within a graphics editor, per ssantos' answer.

第4个选项:脚本自己的解决方案,使用类似的ImageMagick

Option #4: Script yourself a solution, using something like ImageMagick.

这篇关于有没有办法从大规模的形象创造xxhdpi,xhdpi,华电国际,MDPI和LDPI可绘制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆