Coder Social home page Coder Social logo

Comments (15)

SherlockGougou avatar SherlockGougou commented on August 15, 2024

from bigimageviewpager.

SherlockGougou avatar SherlockGougou commented on August 15, 2024

结合coil的issues排查发现,这个应该还是和HEIF有关系,在读取EXIF信息时报错,导致主进程阻塞。
我看能不能HEIF的图片不读取EXIF信息做旋转了。

from bigimageviewpager.

SherlockGougou avatar SherlockGougou commented on August 15, 2024

好像不行,我将库中读取EXIF的地方增加了判断,如果是HEIF时直接return,依旧会报错,依旧会卡顿。暂时先这样,后续发现解决方案时再优化。

from bigimageviewpager.

HenryWu01 avatar HenryWu01 commented on August 15, 2024

可能还是跟这个 issue 有关系?#184 (comment)

from bigimageviewpager.

HenryWu01 avatar HenryWu01 commented on August 15, 2024

可能还是跟这个 issue 有关系?#184 (comment)

我看大佬你设置成了 ARGB_888, 按照那个 issue 中的判断使用 HARDWARE 调用 GPU 可能解决这个问题?

from bigimageviewpager.

SherlockGougou avatar SherlockGougou commented on August 15, 2024

我测试过的,还是会卡顿

from bigimageviewpager.

HenryWu01 avatar HenryWu01 commented on August 15, 2024

我测试过的,还是会卡顿

我去看了一下 Glide 的 issue,这貌似是一个 Glide 的问题?

from bigimageviewpager.

HenryWu01 avatar HenryWu01 commented on August 15, 2024

bumptech/glide#4608

我测试过的,还是会卡顿

我去看了一下 Glide 的 issue,这貌似是一个 Glide 的问题?

from bigimageviewpager.

SherlockGougou avatar SherlockGougou commented on August 15, 2024

from bigimageviewpager.

HenryWu01 avatar HenryWu01 commented on August 15, 2024

嗯,glide中也有读取exif的流程。看这个issue至少一年了,好像也没解决方案。

不如换成 Coil 吧,貌似是个新起之秀。或者开放自定义图片加载库也是个好方法,现在手机厂商拍照默认就 HEIC,这个影响确实有点大了

from bigimageviewpager.

SherlockGougou avatar SherlockGougou commented on August 15, 2024

from bigimageviewpager.

HenryWu01 avatar HenryWu01 commented on August 15, 2024

自定义引擎这个我有计划,一直没时间弄,等🐏好了再说🥲 Henry Wu @.>于2022年12月22日 周四22:30写道:

嗯,glide中也有读取exif的流程。看这个issue至少一年了,好像也没解决方案。 不如换成 Coil 吧,貌似是个新起之秀。或者开放自定义图片加载库也是个好方法,现在手机厂商拍照默认就 HEIC,这个影响确实有点大了 — Reply to this email directly, view it on GitHub <#182 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEIXE2JM7JCVWY4AMGYUWFDWORQYRANCNFSM6AAAAAATDYAWH4 . You are receiving this because you commented.Message ID: @.
>

大佬注意安全啊,身体重要

from bigimageviewpager.

HenryWu01 avatar HenryWu01 commented on August 15, 2024

我查了一些资料,我想到了一种可能的绕过方式。Glide 提供了自定义解码器的能力,阿里云刚好也有一个开源的解码器。如果集成这个 HEIF 解码器,而不使用安卓自带的解码器能否绕过这个问题?

阿里云的开源 HEIF 解码器: https://github.com/aliyun/heif-decoder-lib
阿里云的开源 HEIF 解码器文档: https://help.aliyun.com/document_detail/468071.html

from bigimageviewpager.

HenryWu01 avatar HenryWu01 commented on August 15, 2024

然后就是 Bitmap.Config.HARDWARE 是否需要被设置成默认 (不仅限于 HEIF,根据 Coil 的那个进行判断是否可以使用, 不然就 fallback 到 Bitmap.Config.ARGB_888 或者 Bitmap.Config.RGB_565)?

from bigimageviewpager.

HenryWu01 avatar HenryWu01 commented on August 15, 2024

我查了一些资料,我想到了一种可能的绕过方式。Glide 提供了自定义解码器的能力,阿里云刚好也有一个开源的解码器。如果集成这个 HEIF 解码器,而不使用安卓自带的解码器能否绕过这个问题?

阿里云的开源 HEIF 解码器: https://github.com/aliyun/heif-decoder-lib 阿里云的开源 HEIF 解码器文档: https://help.aliyun.com/document_detail/468071.html

尝试了一下没有效果,看了一下最后已缓存的图片图片是通过 subsampling-scale-image-view 加载的,这样就跟 Glide 没有关系了,是 SSIV 的问题。或许大佬可以看一下 tachiyomi 的这个 fork? 他们使用 c++ 写了一个 decoder。但是却少了一些东西像是EXIF_OREINTATION, image tiling

项目地址: https://github.com/tachiyomiorg/subsampling-scale-image-view
解码器地址: https://github.com/tachiyomiorg/image-decoder

from bigimageviewpager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.