如何在 Android 上缩小图像以获得更好的质量?

发布于 2024-09-28 12:26:04 字数 150 浏览 2 评论 0原文

现在我使用以下代码来缩小运行时从互联网下载的图像。但结果还不够好。

Bitmap.createScaledBitmap(srcBitmap, dstWidth, dstHeight, true);

有什么帮助吗?谢谢。

Now I'm using the follow code to scale down the image downloaded from internet at runtime. But the result is not good enough.

Bitmap.createScaledBitmap(srcBitmap, dstWidth, dstHeight, true);

Any help? Thanks.

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

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

发布评论

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

评论(1

美男兮 2024-10-05 12:26:04

如果结果对您来说不够好,请尝试将图像大小除以 2,直到达到您想要的大小。

If the result is not good enough for you, try dividing the size of the image by 2 until you reach the size you want.

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