title: How to install imagick in xampp/wampp in Windows
body: <p>Today I have tried to install <code>imagick</code> in my xampp a hundred times. And I did it. If you have troubles, please try following these steps:</p>
  <ol>
  <li>Since xampp is x86, check if your Image Magick (the program) is x86. If not, download the latest version here: <strong>imagemagick.org/script/binary-releases.php#windows</strong>
  Please remember that u MUST download the <code>Win32 dynamic at 16 bits-per-pixel</code>.</li>
  <li>Install Image Magick at <code>C:\imagemagick</code>.</li>
  <li>Download the latest stable version of imagick <a href="http://pecl.php.net/package/imagick" rel="nofollow noreferrer">here:</a> . You MUST download the <code>5.x Thread Safe (TS) x86</code>. The x in 5.x is the version of your PHP.</li>
  <li>Put the <code>php_imagick.dll</code> in php/ext folder of your xampp installation.</li>
  <li>Add this in your php.ini: <code>extension=php_imagick.dll</code></li>
  <li>Here is when I have a lot of trouble. If you try to start the server (or writing <code>php</code> in the console (start-&gt;cmd)), you will get an error. If that error says something like this: <code>Unable to find the entry point for the procedure FlattenImages in the DLL CORE_RL_magick.dll</code> it means that you're well underway.</li>
  <li>Now, you must go into the installation folder of Image Magick and overwrite the DLL you downloaded with the <code>php_imagick.dll</code>. All of them start with the prefix <code>CORE_RL_</code>.</li>
  <li>Once you overwrote all of them, you can try writing <code>php</code> in the windows console. I don't say something means that the imagick is functional (you can check in <code>localhost/xampp/ &gt; phpinfo() link</code>. Personally, I had to install a new DLL: <code>vcomp110.dll</code>.
  If someone has the same error as me (the system can't found the <code>vcomp11.dd</code>) <a href="http://es.dll-files.com/vcomp110.dll.html" rel="nofollow noreferrer">download it here</a></li>
  </ol>
  <p>Now, if you try executing <code>php</code> on console, or just initializing the apache module of xampp, you should not have errors.</p>
  <p>Goodbye and hope I can help someone.</p>
  <p>EDIT: when tried to <code>convert some-img.bmp some-result.jpg</code> in the console, I had this error:
  <code>convert.exe: unable to open module file 'C:\Users\my-acc\.magick\IM_MOD_RL_BMP_.dll': No such file or directory @ ...</code>
  This happened when there is no folder <code>.magick</code> in <code>my-acc</code>. The thing you need to do is this:</p>
  <ol>
  <li><p>Create a folder named <code>.magick</code> in the <code>my-acc</code> folder. Since the name starts with a stop, you need to create it through the console. Here are the commands:</p>
  <p>1.1. <code>c:</code></p>
  <p>1.2. <code>cd Users\my-acc</code></p>
  <p>1.3. <code>mkdir .magick</code></p>
  </li>
  <li><p>Go to <code>C:\imagemagick\modules\coders</code> and copy the entire files into the latest folder created.</p>
  </li>
  </ol>
  <p>Now, you will be able to use Image Magick through the commands or the PHP Classes.</p>
  <p>On background, if you use Codeigniter, i have no idea how to use the image_lib with imagick. So, it's better with the own imagick classes. Here a simple example:</p>
  <pre><code>$image = new Imagick($upload_data['full_path']);
  $image-&gt;thumbnailImage(250,0);
  if($image-&gt;writeImage($upload_data['file_path'].$upload_data['raw_name'].'_thumb'.$upload_data['file_ext'])){
      something here;
  }
  $image-&gt;clear();
  </code></pre>