Image.Write method is failing

Sep 21, 2011 at 10:42 PM
I've downloaded and rebuilt the latest code as of 09/21/2011. I copied all the core an IM dlls along with the ImageMagickNET.dll inside the bin folder of my application from where I'm referencing the ImageMagickNET.dll. My code: Image image = new Image(); image.Read(@"c:\test.pdf"); image.Quality(100); image.CompressType(CompressionType.LosslessJPEGCompression); image.Write(@"c:\test.jpg"); --> causes error The application seems to be reading the .pdf fine but when I attempt to write as a JPG then I get the following exception: System.Runtime.InteropServices.SEHException was unhandled Message=External component has thrown an exception. Source=ImageMagickNET ErrorCode=-2147467259 StackTrace: at Magick.Image.write(Image* , basic_string<char\,std::char_traits<char>\,std::allocator<char> >* ) at ImageMagickNET.Image.Write(String filename) in c:\downloads\imagemagicknet\imagemagicknet\image.cpp:line 1044 at PDFToJPGConvertor.Program.Main(String[] args) in C:\Projects\Yazi\Source\Utilities\PDFToJPGConvertor\Program.cs:line 24 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() InnerException: