I have been attempting to install and use ImageMagick.Net for two days with no joy. I was able to install the client version on the server (Windows 2008 x64) and it worked great. Then first tried the latest net2.0 version and could not find the DLL. I tried using Import NameSpace = " ImageMagick" with no luck. I tried the AnyCPU version and no luck. Is there something I'm missign when I try to call Image Magick my code? I'm using a simple example script to test with:
Dim info As New MagickImageInfo("Snakeware.jpg")
Could not load type 'ImageMagick.Web.MagickModule'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Could not load type 'ImageMagick.Web.MagickModule'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): Could not load type 'ImageMagick.Web.MagickModule'.]
System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +11313936
System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +64
[ConfigurationErrorsException: Could not load type 'ImageMagick.Web.MagickModule'.]
System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +11275661
System.Web.Configuration.Common.ModulesEntry..ctor(String name, String typeName, String propertyName, ConfigurationElement configElement) +78
System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList) +194
System.Web.HttpApplication.GetModuleCollection(IntPtr appContext) +1891
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +166
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +336
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +350
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +382
[HttpException (0x80004005): Could not load type 'ImageMagick.Web.MagickModule'.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11404358
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +88
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4398148
Dim info As New MagickImageInfo("Snakeware.jpg")
' Read from stream
Using memStream As MemoryStream = LoadMemoryStreamImage()
info = New MagickImageInfo(memStream)
End Using
' Read from byte array
Dim data As Byte() = LoadImageBytes()
info = New MagickImageInfo(data)
info = New MagickImageInfo()
info.Read("Snakeware.jpg")
Using memStream As MemoryStream = LoadMemoryStreamImage()
info.Read(memStream)
End Using
info.Read(data)
Console.WriteLine(info.Width)
Console.WriteLine(info.Height)
Console.WriteLine(info.ColorSpace)
Console.WriteLine(info.Format)
Console.WriteLine(info.Density.X)
Console.WriteLine(info.Density.Y)
Console.WriteLine(info.Density.Units)
End using
End Using
I tried the web version as well and got the following:Could not load type 'ImageMagick.Web.MagickModule'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Could not load type 'ImageMagick.Web.MagickModule'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): Could not load type 'ImageMagick.Web.MagickModule'.]
System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +11313936
System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +64
[ConfigurationErrorsException: Could not load type 'ImageMagick.Web.MagickModule'.]
System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +11275661
System.Web.Configuration.Common.ModulesEntry..ctor(String name, String typeName, String propertyName, ConfigurationElement configElement) +78
System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList) +194
System.Web.HttpApplication.GetModuleCollection(IntPtr appContext) +1891
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +166
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +336
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +350
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +382
[HttpException (0x80004005): Could not load type 'ImageMagick.Web.MagickModule'.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11404358
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +88
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4398148