title: Installing imagick library extension on xampp Windows?
body: <p>I have to convert pdf to image format (jpg or png) for a thesis project and was planning to install the imagick library on xampp which proved to be tricky. By the way, the php version that I currently have is <strong>PHP 7.4.3</strong>.</p>
  
  <p>I based the steps in installing imagick through this link: <a href="https://ourcodeworld.com/articles/read/349/how-to-install-and-enable-the-imagick-extension-in-xampp-for-windows" rel="nofollow noreferrer">https://ourcodeworld.com/articles/read/349/how-to-install-and-enable-the-imagick-extension-in-xampp-for-windows</a>
  <a href="https://i.stack.imgur.com/8zEt2.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8zEt2.jpg" alt="Information on PHP"></a></p>
  
  <ol>
  <li><p>Installed imageMagick (ImageMagick-7.0.10-0-Q16-x64-dll.exe
  )on my Windows 10 pc (upon checking with the <code>magick -version</code> and was able to display the imageMagick version installed on the pc.)</p></li>
  <li><p>Added php_imagick.dll to xampp/php/ext which I got from PHP PECL website.
   3.4.4  stable  2019-05-02  imagick-3.4.4.tgz (247.5kB)  DLL</p></li>
  <li><p>Enabled the extension on php.ini file through extension=imagick</p></li>
  <li><p>Added the binaries which I got from PECL DEPS (IMO and CORE .dlls).<br>
  11/23/2017  3:58 PM     47633113 ImageMagick-7.0.7-11-vc15-x64.zip</p></li>
  </ol>
  
  <p>Upon running phpinfo() it displayed the following items:</p>
  
  <p><a href="https://i.stack.imgur.com/ZDTDO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZDTDO.png" alt="Imagick Library Module Specifications"></a></p>
  
  <ol start="5">
  <li><p>I decided to test the library using the code
    <code>&lt;?php
  $image = new Imagick();
  $image-&gt;newImage(1, 1, new ImagickPixel('#ffffff'));
  $image-&gt;setImageFormat('png');
  $pngData = $image-&gt;getImagesBlob();
  echo strpos($pngData, "\x89PNG\r\n\x1a\n") === 0 ? 'Ok' : 'Failed';  ?&gt;</code>
  but web page is <strong>blank</strong>. </p></li>
  <li><p>I tried adding the xampp/apache/bin to PATH in Windows to fix the problem but the problem is still there. In addition, this what php intelephense (extension in vscode) produced:
  <a href="https://i.stack.imgur.com/pLzAt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pLzAt.png" alt="enter image description here"></a> </p></li>
  </ol>
  
  <p>Is there anyone out there who can give any advice on how to make this work?</p>