imagemagick - 使用具有原始 FPS 的 imagemagick 调整动画 GIF 文件的大小
问题描述
我想调整动画 gif 文件的大小。我使用了以下命令:
.\convert.exe "d:\example.gif" -resize 600x400 "d:\exampleResult.gif"
结果 gif 文件似乎比原始文件慢得多。更重要的是,当我在没有任何附加参数的情况下调用 convert 时,结果 gif 仍然比原来的慢:
.\convert.exe "d:\example.gif" "d:\exampleResult.gif"
如何使用原始 FPS 调整 gif 大小?
解决方案
您可以使用获得两帧之间的当前延迟
identify -verbose example.gif | grep Delay
.
这应该会给你类似的东西Delay: nx100
,这意味着n/100
原始 gif 中的两帧之间有 th 秒的延迟。
现在,如果您想拥有相同的帧速率,请按以下方式进行
convert -delay n example.gif example_new.gif
如果您希望帧速率更快,请使用
convert -delay m example.gif example_same.gif
哪里m < n
。
反之亦然,帧速率较慢。
希望能帮助到你。
推荐阅读
- scala - Scala 模式匹配类型
- c# - COM:设备仅在事情发生变化时发送数据。如何处理?
- sql - 在 oracle 数据样本中,处理每组最低工资问题(存在重复时)
- mysql - 什么时候在 MySql-workbench 中添加连接?
- validation - .netcore 客户端验证不同的 onPost 处理程序(多个事件)
- spring-boot - SOAP 1.2 中带有 SOAPFaultException 的 Spring WebService、Spring Boot、SoapFault 未显示详细信息、角色等属性
- elixir - 为什么调用 Elixir Kernel.apply/2 而不是调用匿名函数?
- r - 语法有什么区别:| / 对于由于秩不足而具有交互和嵌套的 lmer 模型?
- grid - 3d 中的 Ue4 TiledMap 生成
- python - 读取本地状态/检查点值 Pulumi