def html_to_pixels(html):
    """Render an HTML document to PNG, checks its size and return pixel data.

    Also return the document to aid debugging.

    """
    document = FakeHTML(string=html, base_url=resource_path('<dummy>'))
    return document_to_pixels(document)
Render an HTML document to PNG, checks its size and return pixel data.

Also return the document to aid debugging.
tests/draw/__init__.py