简体   繁体   中英

How do I import MagickImage

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM