Skip to main content

GPU-accelerated image processing library for Python

Project description

PyImageCUDA 0.0.6

PyPI version Build Status Python Platform NVIDIA

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

Demo
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.
  • 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.
  • 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.

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

⚠️ Alpha Release: Many more features are planned and under development. If you have specific needs or bug reports, please open an issue on GitHub.

Core Concepts

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)
  • Transform (Flip, Rotate, Crop)
  • Filter (Gaussian Blur, Sharpen, Sepia, Invert, Threshold, Solarize, Sobel, Emboss)
  • Effect (Drop Shadow, Rounded Corners, Stroke, Vignette)

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.

Contributing

Contributions welcome! Open issues or submit PRs

License

MIT License. See LICENSE for details.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

pyimagecuda-0.0.6-cp313-cp313-win_amd64.whl (232.1 kB view details)

Uploaded CPython 3.13Windows x86-64

pyimagecuda-0.0.6-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (391.1 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pyimagecuda-0.0.6-cp312-cp312-win_amd64.whl (232.1 kB view details)

Uploaded CPython 3.12Windows x86-64

pyimagecuda-0.0.6-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (391.1 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pyimagecuda-0.0.6-cp311-cp311-win_amd64.whl (232.4 kB view details)

Uploaded CPython 3.11Windows x86-64

pyimagecuda-0.0.6-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (391.1 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pyimagecuda-0.0.6-cp310-cp310-win_amd64.whl (232.4 kB view details)

Uploaded CPython 3.10Windows x86-64

pyimagecuda-0.0.6-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (391.1 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file pyimagecuda-0.0.6-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for pyimagecuda-0.0.6-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 4c90e0924411c12813cb74be59acfc04380d91c758477bec02d74d8f8c637d2e
MD5 1c2217809d0b94f12a691d44474eb1a7
BLAKE2b-256 6adb331ec30d0c1ff41cff0b44a75ecc2b16e8353248c99ad9343eaef72ec6fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyimagecuda-0.0.6-cp313-cp313-win_amd64.whl:

Publisher: build.yml on offerrall/pyimagecuda

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyimagecuda-0.0.6-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyimagecuda-0.0.6-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 17ee49b966a25f66ee2234c13ba3690efb49f2eaece030b8dc092a20745277e3
MD5 37d27691f8bbc97a4a1b78f937999cb7
BLAKE2b-256 12ec81c2ac6b450a2206d4c1322808cb2ae325f4672cadee9941116534efdc39

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyimagecuda-0.0.6-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build.yml on offerrall/pyimagecuda

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyimagecuda-0.0.6-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for pyimagecuda-0.0.6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9099beb95eb4979219542e6883ea68d03cc2ca57bfc1e9b5020a28f697509e55
MD5 be8d967d3cf96fc8f6e6acf83ecc672c
BLAKE2b-256 e6edfd528b785f081459ad07dee9d97294ff2faf81c1c17cd331f5638729bb67

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyimagecuda-0.0.6-cp312-cp312-win_amd64.whl:

Publisher: build.yml on offerrall/pyimagecuda

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyimagecuda-0.0.6-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyimagecuda-0.0.6-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f0f594c55614f28a5e5e6c4a2862e4aa9e6409e8e786e4c125f273a1476fba01
MD5 c552836c7a51a4d1ac3dd27f75b0888e
BLAKE2b-256 cbac144d606cc5bd2beccc7ff6701f66a8712fc5af4d11e927832a2c028c7647

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyimagecuda-0.0.6-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build.yml on offerrall/pyimagecuda

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyimagecuda-0.0.6-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for pyimagecuda-0.0.6-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a92d7bf33561ff1831a5434a5226ff1b2981c32882a0bcd59106354db36724ee
MD5 280ca50d41aa237fb03e5fd93b6a82df
BLAKE2b-256 9c8c4644ce67b9789827dcae7686d5577d1a3d5cdab3c867087253cb3d4e7321

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyimagecuda-0.0.6-cp311-cp311-win_amd64.whl:

Publisher: build.yml on offerrall/pyimagecuda

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyimagecuda-0.0.6-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyimagecuda-0.0.6-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c09a835a9495870388b068e58be6c50c08a08513cccc8ad35e790a48d51dbd08
MD5 1ef3c8a824c5110fb11b08b16f98678c
BLAKE2b-256 aeee98d20e0736aa5db88608cdf0a65bfee351209589bc9cd26c6dd330acf455

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyimagecuda-0.0.6-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build.yml on offerrall/pyimagecuda

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyimagecuda-0.0.6-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for pyimagecuda-0.0.6-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5c03a006a165ac42303ee41cd5340ca00cdacebdb0088e0e9f3f5fb5e906a439
MD5 40b8b1f99abcfea3b7732210c889822e
BLAKE2b-256 651abbc8327dd9b55aa6368b9e6aaa4354952cba1636104bdb00dcb7bf515f9d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyimagecuda-0.0.6-cp310-cp310-win_amd64.whl:

Publisher: build.yml on offerrall/pyimagecuda

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyimagecuda-0.0.6-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyimagecuda-0.0.6-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d88e573e8e16a4dce6f38240316e728abd96245e901cf687199423fdae4fe989
MD5 091acd3238e6ecd59129284375a68bfd
BLAKE2b-256 6c6a2550474aa014567783bf9fb89c2d2c5a4ca65e119f02baf4dbbc2fe0f38d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyimagecuda-0.0.6-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build.yml on offerrall/pyimagecuda

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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