title: Php imagick anti aliasing
body: <p>I have a problem with my php: when I make conversion <code>PDF</code> to <code>JPG</code> not shown correctly.</p>
  
  <p>This is the original pictures of pdf - > <a href="http://s16.postimg.org/ma0jizgt1/text_problem2_fw.png" rel="nofollow">http://s16.postimg.org/ma0jizgt1/text_problem2_fw.png</a></p>
  
  <p>This is the jpg after converting with imagick - > <a href="http://s14.postimg.org/ilhs9tt3l/text_problem_fw.png" rel="nofollow">http://s14.postimg.org/ilhs9tt3l/text_problem_fw.png</a></p>
  
  <p>Please can you help me ?</p>
  
  <p>Thank you</p>
  
  <p><strong>PHP:</strong> </p>
  
  <pre><code>if (move_uploaded_file( $_FILES["files"]["tmp_name"], $uploadUrlPdf . $_FILES["files"]["name"]))
  {
  
      $_FILES['files']['name'];
      $nr_pag = $_POST['nr_pagini'];
  
      for($i = 0; $i &lt; $nr_pag; $i++)
      {
  
          $fn = $uploadUrlSwf.sprintf("%02d", "$i").".jpg";
  
          if (!file_exists($fn)) 
          {
              $im = new imagick();
  
              $im-&gt;setResolution($dpi,$dpi);
              $pdf = $uploadUrlPdf.$_FILES['files']['name']."[$i]";
              $im-&gt;readimage($pdf); 
  
              $im-&gt;setImageFormat('jpg');
              $im-&gt;writeImage($fn);
              file_put_contents( $fn, (string)$im );
              $im-&gt;clear(); 
              $im-&gt;destroy();
          }
  
      }
  }
  else
  {     
      echo "error!";
  }
  </code></pre>