title: Converting PDF to images using ImageMagick.NET - how to set the DPI
body: <p>I'm trying to convert pdf files to images.
  ImageMagick is a great tool, and using the command line tool gets me desired result.</p>
  
  <p>but i need to do this in my code,
  So added a reference to <a href="http://imagemagick.codeplex.com/" rel="noreferrer">http://imagemagick.codeplex.com/</a>
  And the following code sample renders each page of the pdf as an image:</p>
  
  <pre><code>MagickNet.InitializeMagick();
  using (ImageList im = new ImageList())
  {
      im.ReadImages(@"E:\Test\" + fileName + ".pdf");
      int count = 0;
      foreach (Image image in im)
      {
          image.Quality = 100;
          image.CompressType = mageMagickNET.CompressionType.LosslessJPEGCompression;
          image.Write(@"E:\Test\" + fileName + "-" + count.ToString() + ".jpg");
          ++count;
      }
  }
  </code></pre>
  
  <p><strong>The problem</strong>: IT LOOKS LIKE CRAP
  the rendered image is hardly readable.
  the problem i realized is it uses the default 72 DPI of ImageMagick.
  and i can't find a way to set it(96dpi or 120dpi gives good results) via the .Net wrapper.</p>
  
  <p>Am I missing something , or there is really no way to set it via this wrapper?</p>
  
  <p>Thanks</p>