Quantcast
Channel: magick Discussions Rss Feed
Viewing all articles
Browse latest Browse all 3693

New Post: Can we Bin Deploy the library without installing anything on server?

$
0
0
Is you have any working sample image re-sizing in ASP.NET 4.0 or 4.5. I have installed C++ Redistributable for Visual Studio 2012 (x86 or x64) and then installed https://nuget.org/packages/Magick.NET-Q16-x64/ package but i am getting,

Could not load file or assembly 'Magick.NET' or one of its dependencies. An attempt was made to load a program with an incorrect format.

If I make Enable 32-bit Application False(Yes I have set this False) then I will get,

[SEHException (0x80004005): External component has thrown an exception.]
Magick.Image.{ctor}(Image* ) +0
ImageMagick.MagickImage..ctor(String fileName) +63
ASPNET4Sample.WebForm1.Page_Load(Object sender, EventArgs e) in c:\Users\user\Documents\Visual Studio 2012\Projects\ASPNET4Sample\ASPNET4Sample\WebForm1.aspx.cs:18
System.Web.UI.Control.LoadRecursive() +71
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178

Here is my code,
    protected void Application_Start(object sender, EventArgs e)
    {
        MagickNET.Initialize(AppDomain.CurrentDomain.BaseDirectory+"Bin\\ImageMagick");
    }
protected void Page_Load(object sender, EventArgs e)
    {
        if (File.Exists(Server.MapPath("~/maps.png")))
        {
            var image = new MagickImage(Server.MapPath("~/maps.png"));
            image.Resize(50, 50);
        }
    }

Viewing all articles
Browse latest Browse all 3693

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>