简体   繁体   English

为什么在分配了最大可能像素后,图像在 hdpi 屏幕[运行 android] 上显得模糊?

[英]Why does an image appear blurry on a hdpi screen[running android] when it has been alloted the max possible pixels?

I want to put a 40 X 40 DP icon somewhere on my app's screen.我想在我的应用程序屏幕上的某处放置一个 40 X 40 DP 图标 Now according to the ratio (3:4:6:8:12:16) of 6 different logical buckets, I have provided an icon(.png file) with different sizes in 6 different drawable folders .现在根据6个不同逻辑桶的比例(3:4:6:8:12:16),我在6个不同的drawable文件夹中提供了一个不同大小的图标(.png文件)

In my case, the icon sizes must be "MDPI = 40 X 40 PX, HDPI = 60 X 60 PX, XHDPI = 80 X 80 PX and so on" to maintain the same quality across devices at 40 X 40 DP.在我的情况下,图标大小必须为“MDPI = 40 X 40 PX、HDPI = 60 X 60 PX、XHDPI = 80 X 80 PX 等等”,以在 40 X 40 DP 的设备上保持相同的质量。

After doing so, I'm testing the app on a device with an HDPI screen , which means it should look into the "drawable-HDPI" folder and render an image that basically fills up all the pixels (60 px in a space that has 60px(based on the screen)).这样做之后,我在具有 HDPI 屏幕的设备上测试该应用程序,这意味着它应该查看“drawable-HDPI”文件夹并渲染一个基本上填满所有像素的图像(60 px 在有60px(基于屏幕))。 But somehow, the icon appears blurry .但不知何故,图标显得模糊

What went wrong here??这里出了什么问题??

Meanwhile, I tried putting an icon with much higher pixels(512 x 512 PX) in the HDPI folder and it renders with high quality.同时,我尝试在 HDPI 文件夹中放置一个像素更高(512 x 512 PX)的图标,它以高质量呈现。

The only confusion is - Despite filling out all the pixels contained in 40 DP on an HDPI display, how an image with more pixels(512) has better quality?唯一的困惑是 -尽管在 HDPI 显示器上填充了 40 DP 中包含的所有像素,但具有更多像素(512)的图像如何具有更好的质量?

<ImageView
    android:layout_width="40dp"
    android:layout_height="40dp"
    android:layout_centerHorizontal="true"
    android:layout_centerVertical="true"
    android:src="@drawable/nameOfImage"/>

Hi you should setup a parameter in Sketchup嗨,你应该在 Sketchup 中设置一个参数

check: on mac /sketchup/preference/opengl/show maximum size of texture检查:在 mac /sketchup/preference/opengl/显示纹理的最大尺寸

on pc /menu/windows/preference/opengl/show maximum size of texture在 pc /menu/windows/preference/opengl/显示纹理的最大尺寸

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

相关问题 为什么在简单的android相机应用中会出现模糊的图像? - Why does a blurry image appear in a simple android camera app? Android Bitmap:像素在缩放时呈矩形(可能存在 Bitmap 伪影) - Android Bitmap: Pixels appear to be rectangular when zooming (possible Bitmap artifacts) Android屏幕大小为ldpi,mdpi,hdpi,xhdpi显示? - 例如:ldpi为1024X768像素 - android splash screen sizes for ldpi,mdpi, hdpi, xhdpi displays ? - eg : 1024X768 pixels for ldpi Android在hdpi设备上缩放hdpi图像 - Android scales hdpi image on hdpi device 为什么在调用onDestroy()方法后,Android概述屏幕仍显示应用程序? - Why does the Android overview screen still show an app after the onDestroy() method has been called? 379x379px图像的Android mdpi,hdpi,xhdpi,xxhdpi和xxxhdpi像素? - Android mdpi, hdpi, xhdpi, xxhdpi and xxxhdpi in pixels for 379x379px image? 为什么我的Delphi TCanvas.DrawLine在Android上运行时不会出现 - Why does my Delphi TCanvas.DrawLine not appear when running on Android 在相机上单击图片后,将图像存储在磁盘上时,android是否会进行有损压缩? - Does android do a lossy compression when storing the image on disk, after a picture has been clicked on camera? Android:图片未出现 - Android: Image does not appear Android有时会模糊屏幕 - Android blurry screen sometimes
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM