title: ImageMagick: How do I convert pdf to jpg? I get ERROR: no decode delegate for this image format
body: <h2>Problem</h2>
  <p>I need to convert a multipage pdf to jpg-files but ImageMagick keeps throwing errors that are hard to interpret.</p>
  <h2>Installing ImageMagick</h2>
  <p>At first I installed it using apt-get, but as I could read that several people had problems doing that, i ended up installing it from source.</p>
  <p>My linux distribution (A Docker image):</p>
  <pre><code>&gt;lsb_release -a
  No LSB modules are available.
  Distributor ID: Debian
  Description:    Debian GNU/Linux 10 (buster)
  Release:        10
  Codename:       buster
  </code></pre>
  <p>Installing ImageMagick from source:</p>
  <pre><code># Installing build tools and ghostscript
  apt update
  apt-get install -y build-essential make ghostscript
  
  # Downloading imagemagick
  wget https://www.imagemagick.org/download/ImageMagick.tar.gz
  
  # Installing and cleaning up
  tar xvzf ImageMagick.tar.gz &amp;&amp; cd ImageMagick-7* &amp;&amp; ./configure &amp;&amp; make &amp;&amp; make install &amp;&amp; ldconfig /usr/local/lib &amp;&amp; cd .. &amp;&amp; rm -r ImageMagick-7*
  
  # Checking ImageMagick version
  &gt;magick -version
  Version: ImageMagick 7.0.10-60 Q16 x86_64 2021-01-25 https://imagemagick.org
  Copyright: (C) 1999-2021 ImageMagick Studio LLC
  License: https://imagemagick.org/script/license.php
  Features: Cipher DPC HDRI OpenMP(4.5)
  Delegates (built-in): jpeg x xml zlib
  </code></pre>
  <h2>Converting files</h2>
  <pre><code># Image to image
  &gt;convert test.jpg test.png
  
  # PDF to image 
  &gt;convert test.pdf test.jpg
  convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/572.
  convert: no images defined `test.jpg' @ error/convert.c/ConvertImageCommand/3304.
  </code></pre>
  <h2>Is Ghostscript the problem?</h2>
  <p>The Ghostscript installation is a common problem for many, but Ghostscript seems to work fine and produce a jpg-file</p>
  <pre><code># PDF to image with Ghostscript
  gs -sDEVICE=pngalpha -sOutputFile=test.jpg test.pdf
  </code></pre>
  <h2>Do I have to install more Delegates?</h2>
  <p>The error suggests that there is something off with my limited delegates, so I thought to install all dependencies up front.</p>
  <pre><code># Listing dependencies
  &gt;apt update &amp;&amp; apt build-dep imagemagick
  Reading package lists... Done
  E: You must put some 'source' URIs in your sources.list
  </code></pre>
  <p>This is where I got stuck.</p>