简体   繁体   English

背景图像质量

[英]Background Image Quality

Android Development help please. Android Development请提供帮助。

Can somone tell me how I might increase the quality of background images in my app? Somone可以告诉我如何提高应用程序中背景图片的质量吗? I have been using Photoshop where the images look great, then I save for the web as a png...then add it to my app... Then on the phone the image looks a little blurred. 我一直在使用Photoshop,图像看起来很棒,然后我将其另存为png ...然后将其添加到我的应用中...然后在电话上,图像看起来有点模糊。

Whats the best way to increase my image quality? 什么是提高图像质量的最佳方法?

I would make sure you're saving it at an adequate resolution. 我会确保您以适当的分辨率保存它。 I'm will to bet that "save for web" reduces the resolution to 72 dpi which may not be enough for an android handset. 我敢打赌,“保存为网络”会将分辨率降低到72 dpi,这可能不足以支持Android手机。 In photoshop, try bumping the resolution of the final png to something like 300 dpi and see if that makes a difference. 在photoshop中,尝试将最终png的分辨率提高到300 dpi,然后看看是否有区别。 From there you can experiment with different resolutions to figure out what's the smallest value you can use and still have a crisp image. 从那里,您可以尝试不同的分辨率,以找出可以使用的最小值,并且仍然具有清晰的图像。 Alternatively, you could just look for the documented resolution requirements. 或者,您可以只查找记录在案的分辨率要求。

The apparent quality of your images may also depend in the type of device you are displaying the images on. 图像的外观质量还可能取决于要在其上显示图像的设备类型。 For example, if your image is saved as 72px x 72px in your image editor, then displayed with a size defined using 72 scaled pixels (sp) in android on a high pixel-density device, then the OS will stretch the image before display. 例如,如果图像在图像编辑器中另存为72px x 72px,然后在高像素密度的设备上以android中72缩放像素(sp)定义的尺寸显示,则操作系统将在显示之前拉伸图像。 As such, the pixel density of the display device can affect the apparent image quality. 这样,显示装置的像素密度会影响视在图像质量。

You can provide different resolution images for different pixel densities by using the hdpi, mdpi and ldpi folders for drawables. 通过将hdpi,mdpi和ldpi文件夹用于可绘制对象,可以为不同的像素密度提供不同分辨率的图像。 See these links for more info: 有关更多信息,请参见以下链接:

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

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