Skip to main content

GPU-accelerated image processing library for Python

Project description

PyImageCUDA 0.0.5

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: 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: 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.5-cp313-cp313-win_amd64.whl (230.6 kB view details)

Uploaded CPython 3.13Windows x86-64

pyimagecuda-0.0.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (389.7 kB view details)

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

pyimagecuda-0.0.5-cp312-cp312-win_amd64.whl (230.6 kB view details)

Uploaded CPython 3.12Windows x86-64

pyimagecuda-0.0.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (389.7 kB view details)

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

pyimagecuda-0.0.5-cp311-cp311-win_amd64.whl (230.9 kB view details)

Uploaded CPython 3.11Windows x86-64

pyimagecuda-0.0.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (389.7 kB view details)

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

pyimagecuda-0.0.5-cp310-cp310-win_amd64.whl (230.9 kB view details)

Uploaded CPython 3.10Windows x86-64

pyimagecuda-0.0.5-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (389.7 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.5-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for pyimagecuda-0.0.5-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 12d65af1d53e89689c77c01638e5129f40d64b0af3b3671fc4ce18ba310e6e94
MD5 4bb9790e23738b0c1a60785b9715c5b8
BLAKE2b-256 585a4569fb898c269dedb48f802b381107839e4665650371298f9c004532e76b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyimagecuda-0.0.5-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.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyimagecuda-0.0.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2d42ef96cbf020c1b339b31c7447dcccf921a062e588ed53e8b9a1f42e5107ce
MD5 06dd5a6ad3f8e3b50dc485a2bfd41cc6
BLAKE2b-256 3adda4d526ac214c4d9ea277c85adf3af1e67f8cbd8b057758e77f247cd144b0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyimagecuda-0.0.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9c414acb5ec543619fdf9302c06752bd7f9892a855f1da81eaca8347f0641c23
MD5 37e969bafbbc8502f7defa965f9a37dc
BLAKE2b-256 947e08e7586c4fc1b904077a42c18e155015ca2d918db7f62e8f8b5a563370f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyimagecuda-0.0.5-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.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyimagecuda-0.0.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 dfb773bdd886751679226d1c8920694f52fd3f1a4a2c9051fbb8c45f69eab123
MD5 b5d9cde430f25684bf218c8b335c25c3
BLAKE2b-256 8e69161a0318c71dff3660d659f2ce7a8b98c965b54d67b00438d2fa8fa67833

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyimagecuda-0.0.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6ce96f22300f19e3009e2803ad9373e78a6e2410f5227a269d1bf8ec93c566b4
MD5 d2b1383eec0a70c4c8ce5e667364cf27
BLAKE2b-256 2f431d7ccd8eb602366acc413dd3b6454a4cc1076c83d14ecb3aa1289601f8c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyimagecuda-0.0.5-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.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyimagecuda-0.0.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 14d6f6edf4925070cf18436e7c43b7dd42e47c4012d02c7ced875fb4fda5055d
MD5 5563bf6de74c05d7ec9165c7aff4673b
BLAKE2b-256 a206e93d9906eb329503b825c36728baa16dc2c7ec1dc3d977511e0b135b70ed

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pyimagecuda-0.0.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 937c7fda2e1baa3ce77ad01c783a4aa0941802b6f81ede43dca730c253aef010
MD5 84467b1bd46e330cbb8d56c5a3aa28eb
BLAKE2b-256 df52477727ea729fe9db3abeb3ba51df33cd6a5636727edd65f4f7d7f3a44d36

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyimagecuda-0.0.5-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.5-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyimagecuda-0.0.5-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9b5cda60ccf5b8822db32261ffdd14bc5fd21d827d572a1bd36bfa4958e93dd2
MD5 ddaf5d726f4e8118d5132363e763f2b9
BLAKE2b-256 1c8bc911de294e6c6d72928ff07d7d04fe7c878467e83c0aebb30987f6f24742

See more details on using hashes here.

Provenance

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