magick命令给出无法打开图像的错误 [英] magick command gives unable to open image error
问题描述
我正在尝试从命令提示符下运行以下命令,但出现以下错误:
I am trying to run below command from my command prompt and it gives me following error:
magick billadd1.jpg -type TrueColorAlpha billadd2.jpg -type TrueColorAlpha \( -clone 0,1 -compose difference -composite -morphology dilate disk:10 \) \( -clone 0 -fill yellow -colorize 100 -channel a -evaluate set 50% +channel \) \( -clone 0,3,2 -compose over -composite +write 1.jpg \) \( -clone 1,3,2 -compose over -composite +write 2.jpg \) null:
magick: unable to open image '\(': No such file or directory @ error/blob.c/OpenBlob/3537.
magick:此图像格式''@ error/constitute.c/ReadImage/562没有解码委托.
magick: no decode delegate for this image format `' @ error/constitute.c/ReadImage/562.
此外,如何使用im4java从Java运行此命令?
Also, how to run this command from java using im4java?
请注意,我正在使用imagemagick veriosn7
Note i am using imagemagick veriosn7
推荐答案
Windows语法不同于Unix/Linux语法.您的命令当前使用Unix/Linux语法:
The Windows syntax is different from Unix/Linux syntax. Your command is currently in Unix/Linux syntax:
magick billadd1.jpg -type TrueColorAlpha billadd2.jpg -type TrueColorAlpha \
\( -clone 0,1 -compose difference -composite -morphology dilate disk:10 \) \
\( -clone 0 -fill yellow -colorize 100 -channel a -evaluate set 50% +channel \) \
\( -clone 0,3,2 -compose over -composite +write 1.jpg \) \
\( -clone 1,3,2 -compose over -composite +write 2.jpg \) null:
转换为Windows时,可能会变成:
Which, when converted to Windows, probably becomes:
magick billadd1.jpg -type TrueColorAlpha billadd2.jpg -type TrueColorAlpha ^
( -clone 0,1 -compose difference -composite -morphology dilate disk:10 ) ^
( -clone 0 -fill yellow -colorize 100 -channel a -evaluate set 50%% +channel ) ^
( -clone 0,3,2 -compose over -composite +write 1.jpg ) ^
( -clone 1,3,2 -compose over -composite +write 2.jpg ) null:
因此,从Linux到Windows的规则如下:
So, the rules are something like this to go from Linux to Windows:
- 在括号前删除反斜杠
- 将反斜杠的行继续符更改为脱字号(
^
) - 将任何百分号加倍
- 将任何单引号更改为双引号
- remove backslashes before parentheses
- change backslash line-continuation character to caret (
^
) - double up any percent signs
- change any single quotes to double-quotes
此处有一些更详细的注释.
There are some more detailed notes here.
这篇关于magick命令给出无法打开图像的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!