简体   繁体   English

Android图片中的缩放比例?

[英]Scaling ratio in Android images?

I am developing a simple informative system which will use a lot of images. 我正在开发一个简单的信息系统,它将使用大量图像。 The problem is I do not know how to scale them to the folder of ldpi, mdpi, hdpi, and hdpi. 问题是我不知道如何将它们扩展到ldpi,mdpi,hdpi和hdpi的文件夹。

I read that android uses a scaling ratio like 3:4:6:8. 我读到android使用的缩放比例如3:4:6:8。 Can some explain to me what is this 3:4:6:8 scaling ratio ? 有人可以向我解释这个3:4:6:8缩放比例是多少? How do I use it, and what is the logic behind it? 我如何使用它,它背后的逻辑是什么?

Suppose I have a 50x50 px image in ldpi folder. 假设我在ldpi文件夹中有一个50x50像素的图像。 If I am going to use 3:4:6:8 ratio . 如果我打算使用3:4:6:8的比例 What will be the next image size for my mdpi folder and hdpi folder? 我的mdpi文件夹和hdpi文件夹的下一个图像大小是什么?

Please help. 请帮忙。 I dont realy understand that scaling ratio. 我真的不明白缩放比例。 Sorry for this, I'm only a newbie in android design. 对不起,我只是Android设计的新手。

Its so simple. 它如此简单。

If image size is 50*50 for Ldpi then: 如果Ldpi的图像尺寸为50 * 50则:

MDPI => 67*67 MDPI => 67 * 67

HDPI => 100*100 HDPI => 100 * 100

XHDPI => 125*125 XHDPI => 125 * 125

Mostly they use these standard sizes: 他们大多使用这些标准尺寸:

ldpi: 36*36 mdpi: 48*48 hdpi: 72*72 xhdpi: 96*96 ldpi:36 * 36 mdpi:48 * 48 hdpi:72 * 72 xhdpi:96 * 96

You can use this simple tool to figure out the conversions. 您可以使用这个简单的工具来计算转化次数。 it doesn't have the xxhdpi, but you can easily modify it to calculate it for you 它没有xxhdpi,但您可以轻松修改它以便为您计算

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM