我应该为Android应用程序中的每个文件夹制作不同的图像吗?(hdpi,mdpi,ldpi)
我想开发一个游戏,但我不确定图片的大小。 在我的手机和模拟器上完成一个动画后,我检查了该应用程序;照片自己改变了尺寸。然后我应该在一张相同大小的图片上为每个文件夹制作不同大小的相同图片并将其放入每个文件夹中。 谢谢!
I want to develop a game but I'm not sure about the sizes of the pics.
I checked the app after I finished one animation on my phone and on my emulator; the pics changed their size by themselves. Then should i make the same pic with different size for each folder on one pic with the same size and put it in each of the folders.
thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您不必这样做,但它可能很有用:有时最好在小分辨率下使用更简单的图像,这就是不同密度有用的地方。
它还允许对缩放进行更细粒度的控制:如果您只提供 hdpi 版本,则如果必须显着缩放该图像,则可能会丢失大量细节。通过提供 ldpi 版本,您可以提供干净的基础图片,无需缩放太多;从而减少潜在的缩放工件(但除非其他版本得到一些清理,否则您最终可能不会看到太大的差异)。
You don't have to, but it can be useful: sometimes it's better to use a simpler image at small resolutions, and that's where the different densities are helpful.
It also allows more fine-grained control of scaling: if you only provide a hdpi version, a lot of detail can be lost if it has to scale that image significantly. By providing a ldpi version, you can provide a clean base picture which won't need to be scaled as much; resulting in fewer potential scaling artifacts (but unless the other versions are cleaned up a bit, you probably won't see much of a difference in the end).