SDWebImage / SDWebImage/SDWebImageWebPCoder

Quality issues for animated images

未关闭
#113 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Objective-C
星标
277
派生
101
PR 合并指标
30 天内没有已合并 PR

描述

Description

My code includes the setting of this limitation:

/// Limits scale down to 24MB.
SDImageCoderHelper.defaultScaleDownLimitBytes = 24 * 1_024 * 1_024

When I get an animated image data that weighs 1.8 MB, the quality is severely degraded, and if I saw correctly my final image was 0.5 MB. I tried to play around with setting the value and in the end I got an image of 7200 bytes with the 1 MB limit set.

This was strange to me, so I tried exploring the codebase and seemed to find the problem in this line: https://github.com/SDWebImage/SDWebImageWebPCoder/pull/75/files#diff-e9c046b25a4d1b5fd2e490c2ebc802f1a63ef0459e0ad74dd3647f72d9c68323R94

Am I misunderstanding the expected behavior? Because it looks like a bug to me. Since it is strange that by setting the limit to 24 MB I get image quality degradation and image size reduction when its image data size is only 1.77 MB.


Also maybe you can tell me why when I try to download a heavy image and several small images, if the heavy image was added earlier, I don't get a response for the small images until the large one is downloaded? (It is important to note that I am considering the case of downloading an image from disk or over the network, only in these cases this happens).

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 SDImageCoderHelper.defaultScaleDownLimitBytes 开始,并检查引用行中链接的 SDWebImageWebPCoder pull request。使用指定的限制重现动画图像的质量和大小行为,然后分别调查磁盘或网络下载的顺序。当观察到的行为得到解释,并且所有已确认的回归都有针对性的测试时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
objective-c
领域
computer-graphics, performance
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
30/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。