在 C# 中使用 Magick.NET
Using Magick.NET with C#
我正在尝试在 C# 中使用 Magick.NET 实现功能。
之前我使用的是:-
// Convert to a png.
Process p = new Process();
p.StartInfo.FileName = @"C:\Program Files\ImageMagick-6.2.8-Q16\convert.exe";
p.StartInfo.Arguments = "-scale 60% \"" + svg + "\" \"" + png + "\"";
p.StartInfo.CreateNoWindow = true;
p.Start();
p.WaitForExit();
TransmitFile(context, png);
我不想在服务器上存储 convert.exe.....现在我想使用代码中的东西,不需要引用服务器上的可执行文件服务器:-
// Pseudo-code:-
MagickImage img = new MagicImage();
Image.Add(svg);
Image.Format = MagickFormat.png;
Image.Scale = 60%;
但是我找不到足够的文档来实现我以前使用的相同功能。有合适的文件的地方吗?我用谷歌搜索了很多,但没有成功。
我正在尝试在 C# 中使用 Magick.NET 实现功能。
之前我使用的是:-
// Convert to a png.
Process p = new Process();
p.StartInfo.FileName = @"C:\Program Files\ImageMagick-6.2.8-Q16\convert.exe";
p.StartInfo.Arguments = "-scale 60% \"" + svg + "\" \"" + png + "\"";
p.StartInfo.CreateNoWindow = true;
p.Start();
p.WaitForExit();
TransmitFile(context, png);
我不想在服务器上存储 convert.exe.....现在我想使用代码中的东西,不需要引用服务器上的可执行文件服务器:-
// Pseudo-code:-
MagickImage img = new MagicImage();
Image.Add(svg);
Image.Format = MagickFormat.png;
Image.Scale = 60%;
但是我找不到足够的文档来实现我以前使用的相同功能。有合适的文件的地方吗?我用谷歌搜索了很多,但没有成功。