I have just installed a Magick.net from the nuget and codeplex. I just want to write a sample application for compressing an image file by reducing its quality and DPI.
As per the little documentation which is available at codeplex, I written the below snippet.
MagickNET.Initialize(@"<<myPath>>\Magick.NET-x86.xml");
using (MagickImage mImage = new MagickImage(txtSourceImage.Text.Trim()))
{
mImage.Quality = 33;
mImage.Depth = 8;
mImage.Density = new MagickGeometry(850, 550);
mImage.Write(tempFilePath);
}
it gives me an error, "The type initializer for 'ImageMagick.Types' threw an exception"
Please any one help me. What is wrong here ?