Skip to content
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

[BUG]动图保存为GIF色彩失真比较严重 #399

Closed
GornBear opened this issue Apr 9, 2024 · 6 comments
Closed

[BUG]动图保存为GIF色彩失真比较严重 #399

GornBear opened this issue Apr 9, 2024 · 6 comments
Labels
bug Something isn't working fixed

Comments

@GornBear
Copy link

GornBear commented Apr 9, 2024

问题自检

请首先按照以下步骤操作,观察问题是否可以解决:

  1. 如果浏览器不是 Chrome 或者 Edge,请使用 Chrome 或 Edge 浏览器安装本扩展程序。
  2. 如果你的 Chrome 或 Edge 浏览器不是最新版本,请更新浏览器。
  3. 如果本扩展程序不是最新版本,请更新到最新版本。最新版本号:version
  4. 尝试刷新出现问题的标签页,或者重启浏览器。
  5. 在本仓库的 issues 列表里搜索问题的关键字,查看是否已经有人报告过此问题。

在你报告 Bug 之前,请确认你执行了上述检查。

Bug 详情
在擷取動圖時如果選擇存為gif,經常有色彩失真的情況,存成webM或apng則不會發生
gif支援色彩較apng少我可以理解,但有時失真還是差異過大

如何重现这个问题?
在動圖頁面點擊快速下載

诊断信息

发生问题时,页面的 URL:https://www.pixiv.net/artworks/114246118
隨意選了一個動圖的網址,但不僅限於此

问题截图:
114246118
114246118

另外,如果有必要,你可以导出下载器的设置,或抓取结果,并添加到附件。
Powerful Pixiv Downloader Settings.json

你的操作系统和浏览器版本号
Windows 10
Chrome 123.0.6312.106

@GornBear GornBear added the bug Something isn't working label Apr 9, 2024
@xuejianxianzun xuejianxianzun added the wontfix This will not be worked on label Apr 9, 2024
@xuejianxianzun xuejianxianzun changed the title [BUG] [BUG]动图保存为GIF色彩失真比较严重 Apr 9, 2024
@xuejianxianzun
Copy link
Owner

这个问题不好解决,因为下载器转换 gif 是用的一个库,不是我自己写的代码。所以现在我没有能力修复它,除非找到个更好的库。

@xuejianxianzun
Copy link
Owner

现在用的是这个库:
https://github.com/jnordberg/gif.js

@xuejianxianzun xuejianxianzun removed the wontfix This will not be worked on label Apr 9, 2024
@xuejianxianzun
Copy link
Owner

xuejianxianzun commented Apr 9, 2024

我找到了解决办法,该工具有一个参数 quality 控制 gif 图像的量化质量,越低越好,从默认的 10 改为 1,质量好了很多。
1
但是右下角的灯棒看起来在闪烁,这依然不符合原图。凑合能看吧。

不过这导致了转换时间变成原来的 3 倍,我测试了一个源文件有 20 多 MB 的动图,转换时间从 9 秒变成了 30 秒。
看来只适合对较小的动图使用高质量。

@xuejianxianzun
Copy link
Owner

我需要测试更多动图在不同质量下的画质和转换速度表现,再决定怎么设置质量。

@xuejianxianzun
Copy link
Owner

这个问题以前我也遇到过,基本都是这种手绘风格+画面剧烈抖动的动图才会出现明显的色差问题。

我进行了一些测试:
转换动图为 GIF 格式时,不同质量的调查.md

之前下载器转换 GIF 固定使用质量 10,我打算改为动态设置质量,动图的原文件体积越小,就使用越好的质量,这可以有效解决某些手绘动图保存为 GIF 时,色差过大的问题。

虽然有时使用最佳质量依然无法完全避免色差,但是比之前还是要好很多。

@xuejianxianzun
Copy link
Owner

17.0.0 版本已经对此问题进行了优化。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed
Projects
None yet
Development

No branches or pull requests

2 participants