BigImageViewPager icon indicating copy to clipboard operation
BigImageViewPager copied to clipboard

缩放 HEIC 的时候崩溃

Open HenryWu01 opened this issue 2 years ago • 2 comments

看了一下 SubsamplingScaleImageView 的 issue 和 Stackoverflow,这应该是 SubsamplingScaleImageView 那边的一个问题Stackoverflow 上说崩溃的原因是因为 SubsamplingScaleImageView 中 Bitmap.Config 默认使用了 RGB_565 导致的。

Stackoverflow 上建议对 SubsamplingScaleImageView 设置:

SubsamplingScaleImageView.setPreferredBitmapConfig(Bitmap.Config.ARGB_8888);

Github 上说到 Bitmap.Config.HARDWARE 应该被设置为默认,但是 API > 26 && API < 28 中存在一些问题需要进行判断 更详细的解决方法在这里: https://github.com/davemorrissey/subsampling-scale-image-view/issues/559#issuecomment-927336756

希望大佬能看一下在 BigImageViewPager 中进行缓解,那边看上去很久没人更新了。

HenryWu01 avatar Dec 21 '22 14:12 HenryWu01

好的,我这边测试一下。希望能够提供heic图片的url

SherlockGougou avatar Dec 21 '22 16:12 SherlockGougou

嗯嗯,这是我之前上个 issue 中那三张 HEIC 图片的 Url:

  • https://rexu-forum-1308280730.cos.ap-shanghai.myqcloud.com/image/2022/11/09/89be250d8fa24248aa8104816819a805.heic
  • https://rexu-forum-1308280730.cos.ap-shanghai.myqcloud.com/image/2022/11/09/b7ee61002e974ee7b693e7471351d108.heic
  • https://rexu-forum-1308280730.cos.ap-shanghai.myqcloud.com/image/2022/11/09/d36ea9faffb246809ba11b535182e7d1.heic

HenryWu01 avatar Dec 21 '22 16:12 HenryWu01