Scaling ratio in Android images?

前提是你 提交于 2019-12-21 04:42:32

问题


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.

I read that android uses a scaling ratio like 3:4:6:8. Can some explain to me what is this 3:4:6:8 scaling ratio? How do I use it, and what is the logic behind it?

Suppose I have a 50x50 px image in ldpi folder. If I am going to use 3:4:6:8 ratio. What will be the next image size for my mdpi folder and hdpi folder?

Please help. I dont realy understand that scaling ratio. Sorry for this, I'm only a newbie in android design.


回答1:


Mostly they use these standard sizes:

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




回答2:


Its so simple.

If image size is 50*50 for Ldpi then:

MDPI => 67*67

HDPI => 100*100

XHDPI => 125*125




回答3:


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



来源:https://stackoverflow.com/questions/11167537/scaling-ratio-in-android-images

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!