简体   繁体   English

图像,大小和不同的屏幕(碎片)

[英]Images, sizes and different screens (fragmentation)

I have a logo to put in a splashscreen. 我有一个徽标可以放在初始屏幕中。 Currently, the image size is 960x320 pixels. 当前,图像尺寸为960x320像素。 I have read the developers google post, of the supported screens, but I don't have any idea of what size need to be in a ldpi, mdpi, hdpi or xhdpi. 我已经阅读了开发人员在支持的屏幕上的google帖子,但是我不知道ldpi,mdpi,hdpi或xhdpi的大小需要多少。

I see a table in another answer that says: 我在另一个答案中看到一张桌子,上面写着:

ldpi x0.75
mdpi x1.00
hdpi x2.00

I don't know if this is true or not. 我不知道这是不是真的。 Could someone shed some light? 有人可以照亮吗? ^^ ^^

您可以使用android dpi( http://coh.io/adpi/ )计算器来计算不同分辨率的图像大小

So take 960x320 as your base density (1x = mdpi). 因此,将960x320作为基本密度(1x = mdpi)。

To get to the other ones you multiply the base size by the other sizes. 要获得其他尺寸,请将基本尺寸乘以其他尺寸。

So to get to hdpi multiply you base by 1.5, 960x320: 因此,要达到hdpi,请将您的底数乘以1.5,960x320:

960 x 1.5 = 1440
320 x 1.5 = 480

This applies from your base density which is generally mdpi. 这适用于您的基本密度(通常为mdpi)。

ldpi = 960 x 0.75 and 320 x 0.75
mdpi = 960 x 1.0 and 320 x 1.0
hdpi = 960 x 1.5 and 320 x 1.5
xhdpi = 960 x 2.0 and 320 x 2.0
xxhdpi = 960 x 3.0 and 320 x 3.0

And so forth. 依此类推。 Generally its best to use a calculator until you understand in more detail why they need to be like that. 通常,最好使用计算器,直到您更详细地了解了为什么他们需要这样。

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

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