how to use imageMagick with C#

后端 未结 3 1673
闹比i
闹比i 2020-12-15 12:36

Could you explain how I can use ImageMagick with C# . I am trying to convert PDF to pages into images.

I want to run imageMagick command \"convert -density 300 $inp

3条回答
  •  星月不相逢
    2020-12-15 13:00

    string arguments = string.Format(@"-density 300 {0}.pdf {1}.png", intputFileName, outputFileName");
    var startInfo = new ProcessStartInfo {
        Arguments = arguments,
        Filename = @"C:\path\to\imagick\convert.exe"
    };
    Process.Start(startInfo).WaitForExit();
    

    References:

    • ProcessStartInfo
    • Process

提交回复
热议问题