全屏位图在 TAB 10.1 上变得像素化

发布于 2024-12-25 17:05:58 字数 432 浏览 2 评论 0原文

我正在画布上绘制全屏位图,我使用的 jpg 是 TAB 10.1 的本机分辨率(1280x752 ..也尝试过 1280x800,这是包括底部菜单的尺寸)

但是图片在即使不应该进行缩放,屏幕也是如此

我用于此测试的图片这是TAB上的结果

这是我使用的代码:

Rect rct = new Rect( 0, 0, 1280, 752 );
canvas.drawBitmap( bitmap, null, rct, lPaint );

有什么想法为什么图片没有按应有的方式显示吗?

I'm drawing a full screen bitmap on my canvas and the jpg I'm using is the native resolution of the TAB 10.1 (1280x752 .. Also tried 1280x800 which is the size including the bottom menu)

But the picture becomes very pixelated on the screen even though no scaling should be taking place

This is the picture I use for this test and this is the result on the TAB

Here's the code I use :

Rect rct = new Rect( 0, 0, 1280, 752 );
canvas.drawBitmap( bitmap, null, rct, lPaint );

Any ideas why the picture is not being shown as it should?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

独享拥抱 2025-01-01 17:05:58

在使用 lPaint 之前请尝试以下操作:

lPaint = new Paint();
lPaint.setAntiAlias(true);
lPaint.setFilterBitmap(true);
lPaint.setDither(true);

Try following before using your lPaint:

lPaint = new Paint();
lPaint.setAntiAlias(true);
lPaint.setFilterBitmap(true);
lPaint.setDither(true);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文