immdebug
Visual image debugger for Python — inspect images from any running process with zoom, pan, pixel values, and colormaps.
Part of the immvision / Dear ImGui Bundle ecosystem.
Install
pip install immdebug
This installs both the client (for sending images) and the viewer (for displaying them).
Quick start
1. Start the viewer (in a terminal):
immdebug-viewer
# or: python -m immdebug
2. Send images (from your code, a script, a notebook, ...):
import numpy as np
from immdebug import immdebug
image = np.random.randint(0, 255, (480, 640, 3), dtype=np.uint8)
immdebug(image, "random noise")
The image appears in the viewer immediately.
How it works
immdebug() serializes the image to a temp directory (<tempdir>/ImmDebug/). The viewer polls this directory and displays incoming images using immvision's inspector.
This is the same protocol used by the C++ ImmDebug() function, so the Python client works with both the Python and C++ viewers.
Use with OpenCV
OpenCV uses BGR channel order. Use immdebug_bgr for correct colors:
import cv2
from immdebug import immdebug, immdebug_bgr
image = cv2.imread("photo.jpg")
immdebug_bgr(image, "original") # BGR image from OpenCV
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
immdebug(gray, "grayscale") # single-channel, order doesn't matter
edges = cv2.Canny(gray, 100, 200)
immdebug(edges, "edges")
Use with PIL, matplotlib, etc.
Most other libraries (PIL/Pillow, matplotlib, stb) use RGB order. Use immdebug (the default):
from PIL import Image
from immdebug import immdebug
import numpy as np
image = np.array(Image.open("photo.jpg"))
immdebug(image, "original")
API
def immdebug(image, legend="", zoom_center=(0.0, 0.0), zoom_ratio=-1.0,
zoom_key="", color_adjustments_key="") -> None:
"""Send an RGB image to the viewer."""
def immdebug_bgr(image, legend="", zoom_center=(0.0, 0.0), zoom_ratio=-1.0,
zoom_key="", color_adjustments_key="") -> None:
"""Send a BGR image (OpenCV) to the viewer."""
| Parameter | Description |
|---|---|
image |
numpy array — HxW (grayscale) or HxWxC (color). Supports uint8, int8, uint16, int16, int32, float32, float64. |
legend |
Display name in the viewer |
zoom_center |
Initial zoom center (x, y) |
zoom_ratio |
Initial zoom ratio (-1 for auto-fit) |
zoom_key |
Link zoom/pan across images sharing this key |
color_adjustments_key |
Link color adjustments across images sharing this key |
Features
- Non-blocking:
immdebug()just writes a file and returns immediately - Post-mortem: images persist in the temp directory for 1 hour — start the viewer after your script finishes
- Single instance: launching a second viewer brings the existing one to the front
- Cross-language: works with both the Python and C++ immdebug viewers
License
MIT
Metadata
Release files for immdebug 1.92.601
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| immdebug-1.92.601.tar.gz | 6.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| immdebug-1.92.601-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.6 kB
Release files / immdebug-1.92.601.tar.gz
| Download URL | immdebug-1.92.601.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ff715a8aac626fcc8ff9101bf687260b84674214d0140bf282b20a0ceb5af273
|
|
BLAKE2b-256 checksum How to use checksums |
c6d603b0d43bf8be48328e5455c7f3070c5ae83df8fe7c5e6daed09eda15b02b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / immdebug-1.92.601-py3-none-any.whl
| Download URL | immdebug-1.92.601-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f894a258a3d600daf402c616b8634b03b828a156989ae10c0a882dc07a3eb419
|
|
BLAKE2b-256 checksum How to use checksums |
4e69452f5de57ac28b50625860768f0a8bf6a6e0c50042c62405d3c81a4f17d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for immdebug 1.92.601
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.