IT Community - Software Programming, Web Development and Technical Support

ImageMagick MagickNet C# WebApplication

This is a discussion on ImageMagick MagickNet C# WebApplication within the C# Programming forums, part of the Software Development category; External component has thrown an exception. Description: An unhandled exception occurred during the execution of the current web request. Please ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > C# Programming

Register FAQ Members List Calendar Mark Forums Read
  #41 (permalink)  
Old 11-16-2007, 02:10 AM
Anandavinayagam Anandavinayagam is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 131
Anandavinayagam is on a distinguished road
Default System.Runtime.InteropServices.SEHException: External component has thrown an excepti

External component has thrown an exception.
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.Runtime.InteropServices.SEHException: External component has thrown an exception.

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:

[SEHException (0x80004005): External component has thrown an exception.]
Magick.Image.{ctor}(Image* , basic_string<char\,std::char_traits<char>\,std::al locator<char> >* ) +0
ImageMagickNET.Image..ctor(String imageSpec)
__________________
The MOSS
Master of Solution Service
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #42 (permalink)  
Old 11-16-2007, 02:17 AM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo to kingmaker
Default Re: ImageMagick MagickNet C# WebApplication

May be Rights issue

Use impersonate
<identity impersonate="true" userName="domain\admin" password="password"/> in web.config
__________________
The KINGMAKER
Makes Every Thing Possible

Stuffs (My Blog)
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #43 (permalink)  
Old 12-18-2007, 03:12 PM
leotsem leotsem is offline
D-Web Trainee
 
Join Date: Dec 2007
Posts: 1
leotsem is on a distinguished road
Default Re: ImageMagick MagickNet C# WebApplication

Hello everybody,
I am using the latest version of ImageMagick with MagickNET and Ghostscript for a .NET project in C#.
I am trying to create an Enumerator to parse a multi-page PDF document and export each page to jpg.
I use the following code:
Code:
ImageMagickNET.ImageList imgList = new ImageMagickNET.ImageList();
imgList.ReadImages(Server.MapPath(filename));
ImageMagickNET.ImageListEnumerator imgArray = new  ImageMagickNET.ImageListEnumerator(imgList);
and I get the following error:

CS1502: The best overloaded method match for 'ImageMagickNET.ImageListEnumerator.ImageListEnume rator(std.list<Magick::Image,std::allocator<Magick ::Image> >*)' has some invalid arguments

Does anyone know what "std.list<Magick::Image,std::allocator<Magick::Ima ge> >*" is?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #44 (permalink)  
Old 12-27-2007, 03:27 AM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo to kingmaker
Default Re: ImageMagick MagickNet C# WebApplication

I am also getting the same error while using the same method....but i dont think it is not a correct version...ImageMagick DLL doen not have the function......
__________________
The KINGMAKER
Makes Every Thing Possible

Stuffs (My Blog)
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #45 (permalink)  
Old 01-09-2008, 10:23 AM
philouf_ philouf_ is offline
D-Web Trainee
 
Join Date: Jan 2008
Posts: 4
philouf_ is on a distinguished road
Default Re: ImageMagick MagickNet C# WebApplication

Hi,

Kingmaker : I can not open your first .dll can you please, can you try to send it per mail?
The dll works well on the developement PC but on others PC I get an error:
An error occured during the process : Could not load file or assembly 'MagickNet, Version=1.0.0.3, Culture=neutral, PublicKeyToken=null'
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #46 (permalink)  
Old 01-09-2008, 08:04 PM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo to kingmaker
Default Re: ImageMagick MagickNet C# WebApplication

can u give me the full exception msg...i think the system...could not find the"System.IO.FileNotFoundException"


and ur email id?
__________________
The KINGMAKER
Makes Every Thing Possible

Stuffs (My Blog)
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #47 (permalink)  
Old 01-10-2008, 12:24 AM
philouf_ philouf_ is offline
D-Web Trainee
 
Join Date: Jan 2008
Posts: 4
philouf_ is on a distinguished road
Default Re: ImageMagick MagickNet C# WebApplication

Thanks for your answers (it was me by mail too alias superfifi).

I have two cases
  • By using the dll provided by the Magicknet website
    With the magicknet dll, it works well on my pc which has vs2k5 but it does not work on the customer pc
    I took the error
    System.IO.FileLoadException: Could not load file or assembly 'MagickNet, Version=1.0.0.3, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Cette application n'a pas pu démarrer car la configuration de l'application est incorrecte. Réinstaller l'application pourrait résoudre ce problème. (Exception from HRESULT: 0x800736B1)
    File name: 'MagickNet, Version=1.0.0.3, Culture=neutral, PublicKeyToken=null' ---> System.Runtime.InteropServices.COMException (0x800736B1): Cette application n'a pas pu démarrer car la configuration de l'application est incorrecte. Réinstaller l'application pourrait résoudre ce problème. (Exception from HRESULT: 0x800736B1)

  • By using your DLLs . I tried the both that you sent me by mail, I get the error
    MagickNet.MagickError: NCFMerger.exe:unable to open image `L92S19106315A2-F-17.jpg': No such file or directory
    at MagickNet.MagickException.Throw()
    at MagickNet.MagickException.Throw(Object source, ExceptInfo* e)
    at MagickNet.Image.Read(String imageSpec)
    at MagickNet.Image..ctor(String imageSpec)
    at NCFMerger.MainForm.backgroundWorker_DoWork(Object sender, DoWorkEventArgs e) in D:\Microsoft\Projects\NCFMergerSolution\NCFMerger\ NCFMergeForm.cs:line 259

I am totally lost, please help me
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #48 (permalink)  
Old 01-10-2008, 01:09 AM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo to kingmaker
Default Re: ImageMagick MagickNet C# WebApplication

Please install this.....
Download details: Visual C++ 2005 SP1 Redistributable Package (x86)


Quote:
* By using your DLLs . I tried the both that you sent me by mail, I get the error
MagickNet.MagickError: NCFMerger.exe:unable to open image `L92S19106315A2-F-17.jpg': No such file or directory
at MagickNet.MagickException.Throw()
at MagickNet.MagickException.Throw(Object source, ExceptInfo* e)
at MagickNet.Image.Read(String imageSpec)
at MagickNet.Image..ctor(String imageSpec)
at NCFMerger.MainForm.backgroundWorker_DoWork(Object sender, DoWorkEventArgs e) in D:\Microsoft\Projects\NCFMergerSolution\NCFMerger\ NCFMergeForm.cs:line 259
This may be due to...image not found "L92S19106315A2-F-17.jpg"......

FEEL FREE TO ASK UR QUERIES
__________________
The KINGMAKER
Makes Every Thing Possible

Stuffs (My Blog)

Last edited by kingmaker : 01-10-2008 at 02:05 AM.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #49 (permalink)  
Old 01-10-2008, 02:21 AM
philouf_ philouf_ is offline
D-Web Trainee
 
Join Date: Jan 2008
Posts: 4
philouf_ is on a distinguished road
Default Re: ImageMagick MagickNet C# WebApplication

!!!!!!!!!!!

THANKS A LOT!!!!!!!

With the dll from the website, we need the C++ lib's tranks kingmaker for your skills and your patience!
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #50 (permalink)  
Old 01-10-2008, 02:24 AM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo to kingmaker
Default Re: ImageMagick MagickNet C# WebApplication

Great....

After installing the "Download details: Visual C++ 2005 SP1 Redistributable Package (x86)" this one....issue fixed right?
__________________
The KINGMAKER
Makes Every Thing Possible

Stuffs (My Blog)
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #51 (permalink)  
Old 01-10-2008, 08:04 AM
philouf_ philouf_ is offline
D-Web Trainee
 
Join Date: Jan 2008
Posts: 4
philouf_ is on a distinguished road
Default Re: ImageMagick MagickNet C# WebApplication

yes. It is ok now, it works well. Thanks again!!!
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #52 (permalink)  
Old 02-20-2008, 06:47 PM
abhi.pandey abhi.pandey is offline
D-Web Trainee
 
Join Date: Feb 2008
Posts: 1
abhi.pandey is on a distinguished road
Exclamation Can it resize to 35000x35000?

Is MagickNet able to resize an image to the size of something like 35000x35000?
I am developing a software to do this banner size images hence I need to resize sometimes big images.

Also, my ImageMagickNet was not working. A very simple code also doesn't compile - gives HResult exception

Code:
string filename = "c:\\myImage1.jpg";
ImageMagickNET.Image medImg = new ImageMagickNET.Image(filename);
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #53 (permalink)  
Old 02-26-2008, 04:59 AM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo to kingmaker
Default Re: ImageMagick MagickNet C# WebApplication

you can convert to any size....depends upon aspect ratio /need required size
__________________
The KINGMAKER
Makes Every Thing Possible

Stuffs (My Blog)

Last edited by kingmaker : 02-26-2008 at 05:02 AM.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #54 (permalink)  
Old 03-27-2008, 09:32 AM
sbrake sbrake is offline
D-Web Trainee
 
Join Date: Mar 2008
Posts: 1
sbrake is on a distinguished road
Default Re: ImageMagick MagickNet C# WebApplication

Where to start? I have a need to convert a pdf document to a tif image. In this particular project all of my pdf documents will be only one page. I can use the MagicNet.dll (version 1.0.0.3) to convert properly a tif image to a pdf. However, I do not know the code to convert a pdf to a tif.

In my searching the web, I found a reference on ImageMagick about specifying the page to convert using the [#], but could only find this option in the ImageMagickNet.dll (version 1.0.2875.2008). I can add this in my references, but when I try to add a using statment "using ImageMagickNet;" I get an error message stating that the type or namespace ImageMagickNet could not be found......

Can anyone help me with this? Respond to this post or send to sbrake@cchosp.com.

Thanks in advance for your help.

Oh, this is not a web app, but a C# console application.

Last edited by sbrake : 03-27-2008 at 09:34 AM. Reason: Left out something
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #55 (permalink)  
Old 03-28-2008, 04:42 AM
Anandavinayagam Anandavinayagam is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 131
Anandavinayagam is on a distinguished road
Default Re: ImageMagick MagickNet C# WebApplication

i have sent the dll try that...
__________________
The MOSS
Master of Solution Service

Last edited by Anandavinayagam : 03-28-2008 at 05:17 AM.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #56 (permalink)  
Old 05-13-2008, 11:36 AM
Deepa Deepa is offline
D-Web Trainee
 
Join Date: May 2008
Posts: 3
Deepa is on a distinguished road
Default Re: ImageMagick MagickNet C# WebApplication

Hi , i am using the magicknet dll from the web site
and i still get the following error message when i run application from a win 2003 machine.
It works fine on my dev machine(winxp).Have tried all possible solutions on this forum and else where.Thanks .
System.IO.FileLoadException: Could not load file or assembly 'MagickNet, Version=1.0.0.3, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Cette application n'a pas pu démarrer car la configuration de l'application est incorrecte. Réinstaller l'application pourrait résoudre ce problème. (Exception from HRESULT: 0x800736B1)
File name: 'MagickNet, Version=1.0.0.3, Culture=neutral, PublicKeyToken=null' ---> System.Runtime.InteropServices.COMException (0x800736B1): Cette application n'a pas pu démarrer car la configuration de l'application est incorrecte. Réinstaller l'application pourrait résoudre ce problème. (Exception from HRESULT: 0x800736B1)
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #57 (permalink)  
Old 05-13-2008, 11:42 AM
tmg tmg is offline
D-Web Trainee
 
Join Date: May 2008
Posts: 2
tmg is on a distinguished road
Default Re: ImageMagick MagickNet C# WebApplication

Hi,

I am having the same problem with Magicknet dll. Can you send me the dll that was posted here before. Thanks.

Tom
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #58 (permalink)  
Old 05-13-2008, 08:27 PM
Anandavinayagam Anandavinayagam is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 131
Anandavinayagam is on a distinguished road
Default Re: ImageMagick MagickNet C# WebApplication

hi deepa,

Did u installed the imagemagick,vcredist.exe in ur win 2003 machine

Thanks
__________________
The MOSS
Master of Solution Service

Last edited by Anandavinayagam : 05-13-2008 at 08:31 PM.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #59 (permalink)  
Old 05-13-2008, 08:29 PM
Anandavinayagam Anandavinayagam is offline
D-Web Sr.Programmer
 
Join Date: Mar 2007
Posts: 131
Anandavinayagam is on a distinguished road
Default Re: ImageMagick MagickNet C# WebApplication

Hi tom,

Give me your mail id..i will send it to u.

Thanks
__________________
The MOSS
Master of Solution Service
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #60 (permalink)  
Old 05-14-2008, 04:01 AM
Deepa Deepa is offline
D-Web Trainee
 
Join Date: May 2008
Posts: 3
Deepa is on a distinguished road
Default Re: ImageMagick MagickNet C# WebApplication

Quote:
Originally Posted by Anandavinayagam View Post
hi deepa,

Did u installed the imagemagick,vcredist.exe in ur win 2003 machine

Thanks
Yes i did , atleast twice.Below is the detailed exception i am getting

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.Runtime.InteropServices.COMException: The specified procedure could not be found. (Exception from HRESULT: 0x8007007F)

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:


[COMException (0x8007007f): The specified procedure could not be found. (Exception from HRESULT: 0x8007007F)]

[FileLoadException: A procedure imported by 'MagickNet, Version=1.0.3054.19983, Culture=neutral, PublicKeyToken=null' could not be loaded.]
Document_Management_Ajax.MainForm.serverListView_D oubleClick(Object sender, EventArgs e) in C:\Projects Code\AjaxEnabledDocumentManagement\trunk\Document Management Ajax\MainForm.cs:946
Gizmox.WebGUI.Forms.Control.OnDoubleClick(EventArg s e) +28
Gizmox.WebGUI.Forms.ListViewItem.FireEvent(IEvent objEvent) +71
Gizmox.WebGUI.Forms.RegisteredComponent.1AAA0(IEve nt 0AAAA) +25
Gizmox.WebGUI.Server.Content.ProcessRequest(HttpCo ntext objHttpContext) +1298

[HttpException (0x80004005): A procedure imported by 'MagickNet, Version=1.0.3054.19983, Culture=neutral, PublicKeyToken=null' could not be loaded.]
Gizmox.WebGUI.Server.Content.ProcessRequest(HttpCo ntext objHttpContext) +1519

[HttpException (0x80004005): A procedure imported by 'MagickNet, Version=1.0.3054.19983, Culture=neutral, PublicKeyToken=null' could not be loaded.]
Gizmox.WebGUI.Server.Content.ProcessRequest(HttpCo ntext objHttpContext) +4309
System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication.IExecutionStep.Execute() +358
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously) +64


i have tried changing different version of magicknet but still get the same issue.i am currently using 6.3.5-9 Q16 dynamic dll.I dont get why it gives a COM exception.Also if u notice in the stack trace it shows me the path of my development machine(winxp) whereas i am running the code of production server(2003).Any clues.Thanks a lot
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/c-programming/3926-imagemagick-magicknet-c-webapplication.html
Posted By For Type Date
ImageMagick • View topic - MagickNet This thread Refback 03-28-2008 09:21 PM
ImageMagick • View topic - MagickNet This thread Refback 02-25-2008 12:46 AM
Software Development - C# Programming at DiscussWeb.com This thread Refback 02-21-2008 01:07 PM
ImageMagick • View topic - MagickNet This thread Refback 01-13-2008 10:43 AM