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

[RFC] 关于动图使用 APNG 的讨论 #3422

Closed
CoelacanthusHex opened this issue Aug 10, 2021 · 11 comments · Fixed by #3430
Closed

[RFC] 关于动图使用 APNG 的讨论 #3422

CoelacanthusHex opened this issue Aug 10, 2021 · 11 comments · Fixed by #3430

Comments

@CoelacanthusHex
Copy link
Member

CoelacanthusHex commented Aug 10, 2021

关于 APNG 的可用性覆盖率:
图片
数据来源: https://caniuse.com/?search=APNG

优势:

  • 更高的清晰度(APNG 使用无损压缩,支持 32bit 图像、8bit 色深,会明显好于 GIF)
  • 同质量下更小的体积(相对于 GIF 和 WebP)[1],利用 PNG 的 filter 压缩率可以有巨大的优势
  • 支持 Alpha 通道(即支持半透明)(与 GIF 比较)
  • 可以支持动画从第二帧开始,第一帧留作他用(比如不支持的设备的 fallback 显示)示例 例子 Related: [RFC] 关于“替换文本”等无障碍设计的讨论 #3435 (comment)
  • 向后兼容 PNG(用不到)

缺点:

  • IE 不支持
  • 待补充

Ref:
[1]: http://littlesvr.ca/apng/gif_apng_webp.html
[2]: https://www.zhangxinxu.com/wordpress/2014/09/apng-history-character-maker-editor/
[3]: https://en.wikipedia.org/wiki/APNG
[4]: https://wiki.mozilla.org/APNG_Specification

@CoelacanthusHex CoelacanthusHex added the Discussion / 需要讨论 Further discussion is welcome label Aug 10, 2021
@Junyan721113
Copy link
Contributor

LGTM

1 similar comment
@renbaoshuo
Copy link
Contributor

renbaoshuo commented Aug 10, 2021

LGTM

CoelacanthusHex added a commit that referenced this issue Aug 10, 2021
Ref: #3422

Signed-off-by: Coelacanthus <CoelacanthusHex@gmail.com>
@kLiHz

This comment has been minimized.

@CoelacanthusHex

This comment has been minimized.

CoelacanthusHex added a commit that referenced this issue Aug 11, 2021
Ref: #3422

Signed-off-by: Coelacanthus <CoelacanthusHex@gmail.com>
@CoelacanthusHex
Copy link
Member Author

#3418#3434 分别是使用工具转换和重新制作的例子,各位可以参考一下效果(重新制作的版本的清晰度受限于我的屏幕分辨率(X11 就是一堆 shit),如果是 Wayland 用户或者 Windows 来录屏应该相对好一点)

@kLiHz
Copy link
Contributor

kLiHz commented Aug 11, 2021

#3418#3434 分别是使用工具转换和重新制作的例子,各位可以参考一下效果(重新制作的版本的清晰度受限于我的屏幕分辨率(X11 就是一堆 shit),如果是 Wayland 用户或者 Windows 来录屏应该相对好一点)

#3418 这样的 GIF,本身画面变化不大,色彩不多,在我这里观看情况转换前后二者无明显差别;
#3434 这种录屏式的动态图像,使用 APNG 的效果确实更好。

不过 OI Wiki 的页面能嵌入视频吗,个人认为演示类的图像使用动图,不便于定位动作的开始和结束,也不便手动执行“重新播放”等操作。

@CoelacanthusHex
Copy link
Member Author

不过 OI Wiki 的页面能嵌入视频吗,个人认为演示类的图像使用动图,不便于定位动作的开始和结束,也不便手动执行“重新播放”等操作。

理论上肯定是可行的,但是实际上没什么必要。主要有以下几点:

  • 不便于定位动作的开始和结束:OI Wiki 使用的动画演示一般不会太长,<=10s 的较多
  • 也不便手动执行“重新播放”等操作:APNG 动图一般是循环播放的
  • 视频文件的话要考虑格式编码兼容性,还要考虑视频栏的控件设计
  • Markdown 不支持 Video

@kLiHz
Copy link
Contributor

kLiHz commented Aug 11, 2021

@CoelacanthusHex 可能是我刚刚表述有一点问题,也许应该这样表述:自动播循环放的动图有些时候像一个粘接起来的纸环,但我们往往很难找到这个纸环的接缝。

@Junyan721113
Copy link
Contributor

@CoelacanthusHex 可能是我刚刚表述有一点问题,也许应该这样表述:自动播循环放的动图有些时候像一个粘接起来的纸环,但我们往往很难找到这个纸环的接缝。

明白,以后制作ASVG的时候我也会注意这个问题

@CoelacanthusHex
Copy link
Member Author

@CoelacanthusHex 可能是我刚刚表述有一点问题,也许应该这样表述:自动播循环放的动图有些时候像一个粘接起来的纸环,但我们往往很难找到这个纸环的接缝。

制作的时候注意应该能比较有效的避免问题(尤其是开始和结束时的画面不同的时候),很多时候演示图像也配有文字说明

Early0v0 pushed a commit that referenced this issue Aug 11, 2021
Ref: #3422

Signed-off-by: Coelacanthus <CoelacanthusHex@gmail.com>
@CoelacanthusHex CoelacanthusHex removed the Discussion / 需要讨论 Further discussion is welcome label Aug 12, 2021
@Konano
Copy link
Member

Konano commented Aug 12, 2021

我表示支持

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants