位图旋转失去Java的质量
我正在尝试旋转一个位图映像,但是问题在于,每次旋转它时,图像都会松开质量,最后会变得模糊。
这是我的Java代码
public Bitmap rotateBitmap(Bitmap bitmap, int angle) {
Matrix matrix = new Matrix ();
matrix.setRotation(angle);
Bitmap newBtmp = Bitmap.createBitmap(bitmap, bitmap.getWidth(), bitmap.getHeight(), matrix, true);
return newBtmp;
}
,然后我尝试将过滤器
更改为false,但我仍然得到相同的结果。
请我如何在不失去质量的情况下旋转位图?
I'm trying to rotate a Bitmap image, but the problem is that the image looses quality Everytime I rotate it, and finally it gets blur.
Here's my Java code
public Bitmap rotateBitmap(Bitmap bitmap, int angle) {
Matrix matrix = new Matrix ();
matrix.setRotation(angle);
Bitmap newBtmp = Bitmap.createBitmap(bitmap, bitmap.getWidth(), bitmap.getHeight(), matrix, true);
return newBtmp;
}
And then I tried to change thefilter
to false, but I still get the same result.
Please how can I rotate a bitmap without loosing quality?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论