【发布时间】:2018-03-26 09:55:11
【问题描述】:
在 Linux (Ubuntu) 上,我可以使用以下命令附加两个动画 gif(大小相同,帧数相同):
convert file1.gif'[0]' -coalesce \\( file2.gif'[0]' -coalesce \\) \\
+append -channel A -evaluate set 0 +channel \\
file1.gif -coalesce -delete 0 \\
null: \\( file2.gif -coalesce \\) \\
-gravity East -layers Composite output.gif
您也可以在此处找到此命令:Animation Modifications。
在 Windows 上,此命令不起作用。它会产生错误:
convert torusEnlargingSpheres3.gif'[0]' -coalesce \\( torusEnlargingSpheres6.gif'[0]' -coalesce \\) +append -channel A -evaluate set 0 +channel torusEnlargingSpheres3.gif -coalesce -delete 0 null:: \\( torusEnlargingSpheres6.gif -coalesce \\) -gravity East -layers Composite output.gif
convert.exe: UnableToOpenBlob `torusEnlargingSpheres3.gif'[0]'': No such file or directory @ error/blob.c/OpenBlob/2701.
convert.exe: NoDecodeDelegateForThisImageFormat `GIF'[0]'' @ error/constitute.c/ReadImage/504.
convert.exe: UnableToOpenBlob `\\(': No such file or directory @ error/blob.c/OpenBlob/2701.
convert.exe: NoDecodeDelegateForThisImageFormat `' @ error/constitute.c/ReadImage/504.
convert.exe: UnableToOpenBlob `torusEnlargingSpheres6.gif'[0']': No such file or directory @ error/blob.c/OpenBlob/2701.
convert.exe: NoDecodeDelegateForThisImageFormat `GIF'[0']' @ error/constitute.c/ReadImage/504.
convert.exe: UnableToOpenBlob `\\)': No such file or directory @ error/blob.c/OpenBlob/2701.
convert.exe: NoDecodeDelegateForThisImageFormat `' @ error/constitute.c/ReadImage/504.
convert.exe: UnableToOpenBlob `\\(': No such file or directory @ error/blob.c/OpenBlob/2701.
convert.exe: NoDecodeDelegateForThisImageFormat `' @ error/constitute.c/ReadImage/504.
convert.exe: UnableToOpenBlob `\\)': No such file or directory @ error/blob.c/OpenBlob/2701.
convert.exe: NoDecodeDelegateForThisImageFormat `' @ error/constitute.c/ReadImage/504.
为了在 Windows 上使用此命令,我应该进行哪些更改?
此命令不会产生错误,但不会附加图像:
convert file1.gif"[0]" -coalesce ^( file2.gif"[0]" -coalesce ^) +append -channel A -evaluate set 0 +channel file1.gif -coalesce -delete 0 null:: ^( file2.gif -coalesce ^) -gravity East -layers Composite output.gif
【问题讨论】:
-
我认为您需要用插入符号 (
^) 替换作为行继续字符的双斜杠。并在打开和关闭括号之前删除双反斜杠。并将单引号替换为双引号。 -
@MarkSetchell 谢谢。我试过了,不成功。
-
请编辑您的问题以显示您的尝试,谢谢。另请查看此答案的底部...stackoverflow.com/a/49358428/2836621
-
@MarkSetchell 我刚刚编辑过。感谢您的链接。
-
我认为括号前不需要插入符号。抱歉,我的 Windows 知识有限。
标签: windows imagemagick