Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8215221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:42:38+00:00 2026-06-07T11:42:38+00:00

Here is the code in question: MagickNet.InitializeMagick(); ImageMagickNET.Image image = new ImageMagickNET.Image(@C:\temp.pdf); image.Quality =

  • 0

Here is the code in question:

MagickNet.InitializeMagick();
ImageMagickNET.Image image = new ImageMagickNET.Image(@"C:\temp.pdf");
image.Quality = 100;
image.CompressType = ImageMagickNET.CompressionType.LosslessJPEGCompression;
image.Write(@"C:\temp.jpg");

I’m fairly certain this code should work, but I get the exceptionally informative exception of: External component has thrown an exception.

This exception is thrown on the line: ImageMagickNET.Image image = new ImageMagickNET.Image(@"C:\temp.pdf");

InnerException: null

StackTrace:

   at Magick.Image.{ctor}(Image* , basic_string<char\,std::char_traits<char>\,std::allocator<char> >* )
   at ImageMagickNET.Image..ctor(String imageSpec)
   at WindowsFormsApplication1.Form1.ReadQRCode(String doc) in C:\Users\me\Documents\Visual Studio 2010\Projects\WindowsFormsApplication1\WindowsFormsApplication1\Form1.Designer.cs:line 126
   at WindowsFormsApplication1.Form1.seperatePDFsInOrder(String fileName) in C:\Users\me\Documents\Visual Studio 2010\Projects\WindowsFormsApplication1\WindowsFormsApplication1\Form1.Designer.cs:line 109
   at WindowsFormsApplication1.Form1.InitializeComponent() in C:\Users\me\Documents\Visual Studio 2010\Projects\WindowsFormsApplication1\WindowsFormsApplication1\Form1.Designer.cs:line 44
   at WindowsFormsApplication1.Form1..ctor() in C:\Users\me\Documents\Visual Studio 2010\Projects\WindowsFormsApplication1\WindowsFormsApplication1\Form1.cs:line 16
   at WindowsFormsApplication1.Program.Main() in C:\Users\me\Documents\Visual Studio 2010\Projects\WindowsFormsApplication1\WindowsFormsApplication1\Program.cs:line 20
   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Anyone have any idea what I might be doing incorrectly?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T11:42:39+00:00Added an answer on June 7, 2026 at 11:42 am

    You seem to declare your image = new as a *.pdf file in your 2nd quoted line. Better try it with c:\tmp.jpg. Or even better c:\temp\tmp.jpg…

    ImageMagick applies its ‘I want to parse this file as a PDF’-mode if it sees the suffix *.pdf. (It applies its magic file type discovery routines only if the filename doesn’t have a suffix.)

    Also the user that is running the code possibly cannot write the file c:\tmp.jpg. There could be two reasons:

    1. c:\ as a directory is not writeable for this user.
    2. the file already exists, and can’t be overwritten by this user (it may belong to another user).

    Lastly, be aware that ImageMagick’s capability to process PDFs as input relies on an external ‘delegate’: it can’t do that job itself, it requires a Ghostscript installation on the same host to call it and let it do the job…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is the code in question: $countries = array(New Zealand, Australia, United Kingdom, New
Here is the code in question: import wx class MyFrame(wx.Frame): This is MyFrame. It
Hi here is the code in question and the issues that i am getting,
Here is the code relevant to my question: http://jsfiddle.net/mkerny45/V23NK/ As you can see there
Here's some code (full program follows later in the question): template <typename T> T
Here is my code (well, some of it). The question I have is, can
Yesterday I posted a question here ( FxCop and Code Analysis Rules ) about
Question is already been asked in title. Here is a code: (function($){ var filter
I have -- what I think -- is a simple question. Here's my code:
Basic question here - I have many lines of code that look something like:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.