PyImageCUDA 0.1.5
GPU-accelerated image compositing for Python.
PyImageCUDA is built for image composition, not computer vision. It provides GPU tools to create, modify, and blend images, rather than analyze or recognize objects within them.
Quick Example
from pyimagecuda import Image, Fill, Effect, Blend, Transform, save
with Image(1024, 1024) as bg:
Fill.color(bg, (0, 1, 0.8, 1))
with Image(512, 512) as card:
Fill.gradient(card, (1, 0, 0, 1), (0, 0, 1, 1), 'radial')
Effect.rounded_corners(card, 50)
with Effect.stroke(card, 10, (1, 1, 1, 1)) as stroked:
with Effect.drop_shadow(stroked, blur=50, color=(0, 0, 0, 1)) as shadowed:
with Transform.rotate(shadowed, 45) as rotated:
Blend.normal(bg, rotated, anchor='center')
save(bg, 'output.png')
Key Features
- ✅ Zero Dependencies: No CUDA Toolkit, Visual Studio, or complex compilers needed. Is Plug & Play on both Windows and Linux.
- ✅ Ultra-lightweight: library weighs ~1 MB.
- ✅ Studio Quality: 32-bit floating-point precision (float32) to prevent color banding.
- ✅ Advanced Memory Control: Reuse GPU buffers across operations and resize without reallocation—critical for video processing and batch workflows.
- ✅ OpenGL Integration: Direct GPU-to-GPU display for real-time preview widgets.
- ✅ CUDA Interop (Zero-Copy): Native
__cuda_array_interface__v3 support. Share GPU buffers with CuPy, PyTorch, Numba and the rest of the CUDA Python ecosystem without copies. - ✅ API Simplicity: Intuitive, Pythonic API designed for ease of use.
Use Cases
- Generative Art: Create thousands of unique variations in seconds.
- Motion Graphics: Process video frames or generate effects in real-time.
- Image Compositing: Complex multi-layer designs with GPU-accelerated effects.
- Node Editors & Real-time Tools: Build responsive image editors with instant preview.
- Game Development: Procedural UI assets, icons, and sprite generation.
- Marketing Automation: Mass-produce personalized graphics from templates.
- Data Augmentation: High-speed batch transformations for ML datasets.
PyImageCUDA Ecosystem
This library is the foundation. For visual workflows:
- Node-based image compositor with real-time preview
- Design templates visually, automate with Python
- 40+ nodes: generators, effects, filters, transforms
- Headless batch processing API
pip install pyimagecuda-studio
Installation
Installation
pip install pyimagecuda
Note: pyvips is the only mandatory dependency (installed automatically). It is used strictly for robust file I/O (JPG, PNG, WEBP...) and high-quality Text rendering on the CPU.
Documentation
Core Concepts
- Getting Started Guide
- Image & Memory (Buffer management)
- IO (Loading and Saving)
- OpenGL Integration (Real-time preview, zero-copy display)
- CUDA Interop (Zero-copy with CuPy, PyTorch, Numba)
Operations
- Fill (Solid colors, Gradients, Checkerboard, Grid, Stripes, Dots, Circle, Ngon, Noise, Perlin)
- Text (Rich typography, system fonts, HTML-like markup, letter spacing...)
- Blend (Normal, Multiply, Screen, Add, Overlay, Soft Light, Hard Light, Mask)
- Resize (Nearest, Bilinear, Bicubic, Lanczos)
- Adjust (Brightness, Contrast, Saturation, Gamma, Opacity, Vibrance, Hue)
- Transform (Flip, Rotate, Crop, Zoom)
- Filter (Gaussian Blur, Sharpen, Sepia, Invert, Threshold, Solarize, Sobel, Emboss)
- Effect (Drop Shadow, Rounded Corners, Stroke, Vignette, Chroma Key)
Performance
PyImageCUDA shows significant speedups for GPU-friendly operations like blending, filtering, and transformations. Performance varies by operation complexity and workflow:
- Complex operations (blur, blend, rotate) see 10-260x improvements
- Simple operations (flip, crop) see 3-20x improvements
- Real-world pipelines with file I/O typically see 1.5-2.5x speedups
Results depend on your hardware, batch size, and whether you reuse GPU buffers.
Requirements
- OS:
- Windows 10 or 11 (64-bit).
- Linux: Any modern distribution (Ubuntu, Fedora, Debian, Arch, WSL2, etc.).
- GPU: NVIDIA GPU (Maxwell architecture / GTX 900 series or newer).
- Drivers: Standard NVIDIA Drivers installed.
NOT REQUIRED: Visual Studio, CUDA Toolkit, or Conda.
Linux Compatibility & Troubleshooting
PyImageCUDA is currently tested primarily on Ubuntu LTS releases with up-to-date NVIDIA drivers.
If you encounter the following error on Linux:
RuntimeError: Kernel launch failed: the provided PTX was compiled with an unsupported toolchain.
Solution: This indicates your installed NVIDIA drivers are too old to execute the kernels included in the library. Please update your NVIDIA drivers to the latest version available for your distribution (Proprietary drivers recommended).
We are actively investigating ways to broaden compatibility for older drivers and legacy Linux distributions in future releases.
Tests
pytest tests/tests.py
Contributing
Contributions welcome! Open issues or submit PRs
License
MIT License. See LICENSE for details.
Metadata
Release files for pyimagecuda 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| pyimagecuda-0.1.5-cp313-cp313-win_amd64.whl | CPython 3.13 | CPython 3.13 | Windows x86-64 | Details |
| pyimagecuda-0.1.5-cp313-cp313-manylinux_2_28_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.28+ x86-64 | Details |
| pyimagecuda-0.1.5-cp312-cp312-win_amd64.whl | CPython 3.12 | CPython 3.12 | Windows x86-64 | Details |
| pyimagecuda-0.1.5-cp312-cp312-manylinux_2_28_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.28+ x86-64 | Details |
| pyimagecuda-0.1.5-cp311-cp311-win_amd64.whl | CPython 3.11 | CPython 3.11 | Windows x86-64 | Details |
| pyimagecuda-0.1.5-cp311-cp311-manylinux_2_28_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.28+ x86-64 | Details |
| pyimagecuda-0.1.5-cp310-cp310-win_amd64.whl | CPython 3.10 | CPython 3.10 | Windows x86-64 | Details |
| pyimagecuda-0.1.5-cp310-cp310-manylinux_2_28_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux glibc 2.28+ x86-64 | Details |
Total release size: 5.6 MB
Release files / pyimagecuda-0.1.5-cp313-cp313-win_amd64.whl
| Download URL | pyimagecuda-0.1.5-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 499.3 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
c27bc22deaf40d7bb3c1ad5ac970f14258855e457832e4f4ded5d4485e381615
|
|
BLAKE2b-256 checksum How to use checksums |
7a125579d71c73b5880e74701006cfd06d4cae6cb692f31dc5f0a7a557458fa3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 10, 2026.
Transparency logRelease files / pyimagecuda-0.1.5-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | pyimagecuda-0.1.5-cp313-cp313-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 908.1 kB |
| Tags | CPython 3.13 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
4e97ecb3a03d10ca2358772f3fc1a11d97b82aeecec87f322255ca4affb44660
|
|
BLAKE2b-256 checksum How to use checksums |
1c409efde5f7ddab4a5c29e3e273b07d5615377373bacb59a7a12c9d38fdc58c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 10, 2026.
Transparency logRelease files / pyimagecuda-0.1.5-cp312-cp312-win_amd64.whl
| Download URL | pyimagecuda-0.1.5-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 499.3 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
01dea358ca015e58d6d453d2d4482b193f88a735f14c8ff8440078f7399c084c
|
|
BLAKE2b-256 checksum How to use checksums |
ecfcc72d9f24d97ac4f5e158741a1e9cbabb3fc3aa71fa43a9d9335c661121b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 10, 2026.
Transparency logRelease files / pyimagecuda-0.1.5-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | pyimagecuda-0.1.5-cp312-cp312-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 908.1 kB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
7a93d54f35162d01145acc47539e3da8b0d8b645d5a8784ce3b011ac40f37f64
|
|
BLAKE2b-256 checksum How to use checksums |
40910f093b612ebddf797f65ec18e5e865356df2ed6e4d0db6be46786ec2937b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 10, 2026.
Transparency logRelease files / pyimagecuda-0.1.5-cp311-cp311-win_amd64.whl
| Download URL | pyimagecuda-0.1.5-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 499.7 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
f74c24a19865870ba4361fa1f8bda28c9878a1de628cc8555f6af1279f40612f
|
|
BLAKE2b-256 checksum How to use checksums |
1e2d4a06eb1a2db301b38c1c18c6c1a75679e6d659093dbf3920a83bb050ffd8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 10, 2026.
Transparency logRelease files / pyimagecuda-0.1.5-cp311-cp311-manylinux_2_28_x86_64.whl
| Download URL | pyimagecuda-0.1.5-cp311-cp311-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 908.1 kB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
6335425ca66f6d927ce702e67d9e62de829feff85faa253575b5df905620ee8c
|
|
BLAKE2b-256 checksum How to use checksums |
224f098dcf09bb49053e01755d854fb98821d039822e84fe218abcf27571f54b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 10, 2026.
Transparency logRelease files / pyimagecuda-0.1.5-cp310-cp310-win_amd64.whl
| Download URL | pyimagecuda-0.1.5-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 499.7 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
31f2f926ba8981d6e776c993a867fe26159122205cc27ae59c66c2964beb0183
|
|
BLAKE2b-256 checksum How to use checksums |
e6575c8fc6ea8c23cb18778bf9fb12055e29b55162d3a0370b0677821c39b0fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 10, 2026.
Transparency logRelease files / pyimagecuda-0.1.5-cp310-cp310-manylinux_2_28_x86_64.whl
| Download URL | pyimagecuda-0.1.5-cp310-cp310-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 908.1 kB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
4bd2ec479b9b71036e5ca5db1e9a572595f2227b2967c1897a5f68be7e591b7c
|
|
BLAKE2b-256 checksum How to use checksums |
52c4f016909428156d63468f58488ea7cec34e3b0683687b22a16e6d9a5ef36f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 10, 2026.
Transparency log