title: imagick error: 'unable to open image' image upload
body: <p>I get the following error when trying to process uploaded images with imagick.</p>
  
  <blockquote>
    <p>Fatal error: Uncaught exception 'ImagickException' with message 'unable to open image `9eK59iu.jpg': No such file or directory @ error/blob.c/OpenBlob/2644' in D:\PATH\upload.php on line 77</p>
  </blockquote>
  
  <p>The code looks like this:</p>
  
  <pre><code>&lt;?php
  
      $new_folder_name = "D:/PATH/content";       
      mkdir("$new_folder_name",0700);
  
      $tmp_img = $_FILES["upload_file"]["tmp_name"];
  
      $img = new Imagick($tmp_img);
      $img-&gt;thumbnailImage(100 , 100 , TRUE);
      $img-&gt;writeImage($new_folder_name);
  
  ?&gt;
  </code></pre>
  
  <p>Without imagick the image upload works just fine.</p>
  
  <p>Only imagick won't open the image given to $_FILES</p>
  
  <p>I also tried to open the image with imagick, after <code>move_uploaded_file</code>, like this:</p>
  
  <pre><code>&lt;?php
  
      $extension = pathinfo($upload_file_name, PATHINFO_EXTENSION);
      $new_upload_file_name = rand(00000, 99999).".".$extension;
  
      $new_folder_name = "D:/PATH/content".time();        
      mkdir("$new_folder_name",0700);
  
      $path_to_file = $new_folder_name."/".$new_upload_file_name;
  
      move_uploaded_file($_FILES["upload_file"]["tmp_name"],$path_to_file);
  
      $img = new Imagick($path_to_file);
      $img-&gt;thumbnailImage(100 , 100 , TRUE);
      $img-&gt;writeImage($new_folder_name);
  
  ?&gt;
  </code></pre>
  
  <p>neither works.. :-(</p>
  
  <p>Any suggestion?</p>