我正在尝试在 .NET 应用程序中调用 Image Magick。当我复制相同的参数并使用命令行调用它时,这很奇怪。没关系,但是当我通过 C# 应用程序调用它时,最后出现错误。当我通过我的应用程序调用它时,我不知道它为什么会期望 Affine 参数。请帮忙。
var proc = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = @"C:\Program Files (x86)\ImageMagick-6.8.4-Q16\convert.exe",
Arguments = "\"C:\\Users\\Pouya\\Desktop\\Rugs\\test.jpg\" -matte -virtual-pixel transparent -distort Perspective ' 2,2 0,0 2,198 0,200 198,198 200,200 198,2 200,0' \"C:\\Users\\Pouya\\Desktop\\Rugs\\testResult.jpg\"",
UseShellExecute = false,
RedirectStandardError = true,
CreateNoWindow = true
}
};
proc.Start();`
“convert.exe:选项仿射的无效参数:'需要至少 1 个 CP'@error/distort.c/GenerateCoefficients/530。\r\nconvert.exe: 无法打开图像2,2': No such file or directory @ error/blob.c/OpenBlob/2641.\r\nconvert.exe: no decode delegate for this image format
2,2'@error/constitute.c /ReadImage/550。\r\nconvert.exe: 无法打开图像0,0': No such file or directory @ error/blob.c/OpenBlob/2641.\r\nconvert.exe: no decode delegate for this image format
0,0'@error/constitute.c/ReadImage/550。\r\nconvert.exe: 无法打开图像2,198': No such file or directory @ error/blob.c/OpenBlob/2641.\r\nconvert.exe: no decode delegate for this image format
2,198'@error/constitute.c /ReadImage/550。\r\nconvert.exe: 无法打开图像0,200': No such file or directory @ error/blob.c/OpenBlob/2641.\r\nconvert.exe: no decode delegate for this image format
0,200' @error/constitute.c/ReadImage/550。\r\nconvert.exe: 无法打开图像198,198': No such file or directory @ error/blob.c/OpenBlob/2641.\r\nconvert.exe: no decode delegate for this image format
198,198' @error/constitute.c/ReadImage /550。\r\nconvert.exe: 无法打开图像200,200': No such file or directory @ error/blob.c/OpenBlob/2641.\r\nconvert.exe: no decode delegate for this image format
200,200'@error/composee.c/ReadImage/550。\r\nconvert.exe: 无法打开图像198,2': No such file or directory @ error/blob.c/OpenBlob/2641.\r\nconvert.exe: no decode delegate for this image format
198,2'@error/constitute.c/ReadImage /550.\r\nconvert.exe: 无法打开图像200,0'': No such file or directory @ error/blob.c/OpenBlob/2641.\r\nconvert.exe: no decode delegate for this image format
200,0'' @错误/构成.c/ReadImage/550。\r\n"