title: Convert HTML string to an image in Python
body: <p>I want to convert following HTML to PNG image in Python.</p>
  <pre class="lang-html prettyprint-override"><code>&lt;html&gt;
      &lt;b&gt;Bold text&lt;/b&gt;
  &lt;/html&gt;
  </code></pre>
  <p>This HTML is, of course, an example.</p>
  <p>I have tried 'pisa' but it converts html to PDF, not to image.
  I can convert HTML to PDF and then convert PDF to PNG, but I was wondering if there is any direct solution (i.e HTML to PNG). Any built-in or external module will work nicely.</p>
  <p>If this can be done in Graphicsmagick or Imagemagick, then it will be perfect.</p>