I found this example
using ImageMagick;
using (MagickImage image = new MagickImage("input.svg"))
{
image.Scale(new Percentage(60));
image.Write("output.png");
}
and added imageMagick via
dotnet add package Magick.NET.Core --version 8.3.3
I can't get it to compile, geting the error:
error CS0246: The type or namespace name 'MagickImage' could not be found (are you missing a using directive or an assembly reference?
how do I fix this? What import/using am I missing?
CodePudding user response:
For a .NET Core 3.1 app, using Visual Studio 2019, I used a specific build Magick.NET-Q16-AnyCPU
v8.3.3 NuGet package, instead of the more generic Magick.NET.Core
. Using Q16 I could build without errors. I'm not sure if NuGet is the same thing as running dotnet add package ...
though.