-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
加载一个大图,缩小之后会出现失真的情况 #83
Comments
提供下sample代码和webp图片,失真的截图。缩小是什么意思 |
Glide.with(this).load(R.drawable.head2).into(iv2); |
head.webp.zip |
大致看了下,应该是libwebp降采样解码的bug,需要给google反馈下 |
我这边试了一下,renderFrame的时候,先获取原尺寸图,在通过BitmapFactory降低采样率,就不会出这个问题,但是cpu占用相应会高。 |
这样是利用Android Bitmap解码png的能力,不推荐这么做,2次解码了,cpu和性能都有影响;解码原图后,直接Bitmap scale下更快,只是内存占用会多点,缓存有上限,没有极端webp图应该还好。影响你们APP功能使用的话,可以这样改workaround下。 |
scale 好像也会出现不一样的问题,之前试过了,但是具体效果记不清了。 |
加载一个大图,缩小之后会出现失真的情况
如果需要,我可以提供一个webp
The text was updated successfully, but these errors were encountered: