我正在尝试在.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'的2,2': No such file or directory @ error/blob.c/OpenBlob/2641.\\r\\nconvert.exe: no decode delegate for this image format \\ 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 / composition.c 0,200': No such file or directory @ error/blob.c/OpenBlob/2641.\\r\\nconvert.exe: no decode delegate for this image format \\ 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': 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'的200,200': No such file or directory @ error/blob.c/OpenBlob/2641.\\r\\nconvert.exe: no decode delegate for this image format \\ 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的200,0'': No such file or directory @ error/blob.c/OpenBlob/2641.\\r\\nconvert.exe: no decode delegate for this image format , 0''@错误/constitute.c/ReadImage/550。\\r\\n“

===============>>#1 票数:1 已采纳

' 2,2 0,0 2,198 0,200 198,198 200,200 198,2 200,0'周围的单引号更改为转义双引号。 在第一引号之后也要立即删除多余的空格:

\"2,2 0,0 2,198 0,200 198,198 200,200 198,2 200,0\" 

  ask by Pouya BCD translate from so

未解决问题?本站智能推荐: