Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Tuesday, August 8, 2017 8:24 PM
Does anyone know how to implement ImageMagick library in C# and utilize it ? I have following command for ImageMagick that gives me out put and i want to utilize it in c# . There are some fourms on it but i does not specify how i would go about writing following in it.
convert c:\images.jpg -colorspace HCL -channel green -separate +channel -format "%M %[fx:100*mean]\n" info:
All replies (1)
Wednesday, August 9, 2017 6:43 AM âś…Answered
Hello DC_010,
Does anyone know how to implement ImageMagick library in C#
You should check out Magick.NET ,just download the assemblies from your nuget and choose the correct version of ImageMagick.Reference the MagickNet binaries in your project .For more information ,you could see here.
https://magick.codeplex.com/documentation
and how to utilize it.
I have created a simple demo that read data from file by using Magick .NET base on the example in github and it works well.
using (MagickImage image = new MagickImage(@"C:\Users\v-feih\Pictures\Saved Pictures\1.gif"))
{
Console.WriteLine("BackGroundColor:"+image.BackgroundColor);
Console.WriteLine("Format:" + image.Format);
}
For more example. you could take a look at here.
https://github.com/dlemstra/Magick.NET/tree/master/Samples/Magick.NET.Samples/Samples/Magick.NET
And if you want to open a command window in windows and use the imagemagick convert command , you could see here.
If you have any question about magick.net , you could post a new thread to there.
https://github.com/dlemstra/Magick.NET/issues
Best regards,
Feih_7
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected].