Skip to main content

Zero-dependency HTML to Image converter

Project description

CoreImR

Advanced, Zero-dependency HTML, CSS, and JS to Image converter for Python.

It simply opens a temporary HTML file in a headless browser (Chrome or Edge) that is already installed on the system and takes a screenshot. 100% zero-dependency, lightweight, fast, and feature-rich!

Features

  • Zero Dependencies
  • Configurable Dimensions (Width/Height)
  • Support for Transparent Backgrounds
  • Delay / Virtual Time Budget (wait for animations/JS to load before capture)

Installation

pip install coreimr

Usage

Simple Example

from coreimr import render

render('<h1>Hello!</h1>', 'output.png')

Advanced Example

from coreimr import CoreImR

html = """
<!DOCTYPE html>
<html>
<body style="background: rgba(0, 0, 255, 0.5); width: 100vw; height: 100vh; display: flex; align-items: center; justify-content: center;">
    <h1 style="color: white; font-family: sans-serif;">Advanced CoreImR!</h1>
</body>
</html>
"""

imr = CoreImR(width=1920, height=1080, transparent=True, delay=500)
imr.render(html, 'output_advanced.png')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coreimr-1.0.1.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

coreimr-1.0.1-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file coreimr-1.0.1.tar.gz.

File metadata

  • Download URL: coreimr-1.0.1.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for coreimr-1.0.1.tar.gz
Algorithm Hash digest
SHA256 4dfc0d1768ddcb6719d5c463c1c3ac3b81ae9fa61d4c07c33a19562b084b07cb
MD5 4bfe6918c3e1a9b5b915a2ed6c4ea37b
BLAKE2b-256 10fbe70bc8379a0270c87db3779ef3b394d0be62ed29f20b2b8fee54c3693b4f

See more details on using hashes here.

File details

Details for the file coreimr-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: coreimr-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for coreimr-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8537554d1853ca7700f71d30b2d77e9d723ab2c362615e8039d2a72924764cf4
MD5 5121c4945ad7a6e1f2a5431362a20e97
BLAKE2b-256 b31adc75ab310187b8d91d4597bdad21db6a64767b318f54c161bb62dc942677

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page