Skip to main content

GPU-accelerated image processing library for Python

Project description

PyImageCUDA 0.0.4

PyPI version Build Status Python

GPU-accelerated image compositing for Python.

PyImageCUDA focuses on creative image generation rather than computer vision. Expect GPU-accelerated effects for design workflows—blending modes, shadows, gradients, filters... not edge detection or object recognition.

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.
  • Ultra-lightweight: library weighs <0.5 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: Automatically installs pyvips binary dependencies for robust image format support (JPG, PNG, WEBP, HEIC).

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

  • Adjust (Brightness, Contrast, Saturation, Gamma, Opacity)
  • Transform (Flip, Rotate, Crop)
  • Blend (Normal, Multiply, Screen, Add, Overlay, Soft Light, Hard Light, Mask)
  • Resize (Nearest, Bilinear, Bicubic, Lanczos)
  • Filter (Gaussian Blur, Sharpen, Sepia, Invert, Threshold, Solarize, Sobel, Emboss)
  • Effect (Drop Shadow, Rounded Corners, Stroke, Vignette)
  • Fill (Solid colors, Gradients, Checkerboard, Grid, Stripes, Dots, Circle, Ngon, Noise, Perlin)

Requirements

  • OS: Windows 10 or 11 (64-bit). Linux support coming soon.
  • 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.4-cp313-cp313-win_amd64.whl (230.5 kB view details)

Uploaded CPython 3.13Windows x86-64

pyimagecuda-0.0.4-cp312-cp312-win_amd64.whl (230.5 kB view details)

Uploaded CPython 3.12Windows x86-64

pyimagecuda-0.0.4-cp311-cp311-win_amd64.whl (230.8 kB view details)

Uploaded CPython 3.11Windows x86-64

pyimagecuda-0.0.4-cp310-cp310-win_amd64.whl (230.8 kB view details)

Uploaded CPython 3.10Windows x86-64

File details

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

File metadata

File hashes

Hashes for pyimagecuda-0.0.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8af53e5050ca1987926d9a7302475441392da9516b2017b60a1fbd7fc9fc9eeb
MD5 63624eebba3aded46a2d73c820c44e4e
BLAKE2b-256 8d96fee02daaf3e28ede2b30b2b08e8f0a9335157c1ddfce82afec574122edca

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyimagecuda-0.0.4-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.4-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for pyimagecuda-0.0.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 47a43bee62d6b0c07fe6f46223ce78d348631065f8c9240f2a58cf4fbfd16b45
MD5 8791a50857ecdc3e6210f9dde7592bea
BLAKE2b-256 39d37af24e3d9056f04e6f73c9582df53202c9e83a7996df3033159d21074fed

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyimagecuda-0.0.4-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.4-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for pyimagecuda-0.0.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e01baaa306d602da4df4ca1b7186e04a36ded69e8f8e1b52c707dee198cddeef
MD5 749aae927946006e55513d642c84c5f7
BLAKE2b-256 7930a75c3c518355940f7bfd44fad39b56defbfec5013859d85e1f5222deb7a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyimagecuda-0.0.4-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.4-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for pyimagecuda-0.0.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 737af25af08da7d12212cee263b773d541d8abe52a04ad8f01d1d3d3563089e2
MD5 9950e47fc464fa7019a2b9db7ea6f447
BLAKE2b-256 8c0d20b5427749ae88de0456bc1c6469325b17d383247a95b2f95003c4ee18d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyimagecuda-0.0.4-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.

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